非公共类型的公共别名
我想知道它是否有效的C ++: class Test { struct PrivateInner { PrivateInner(std::string const &str) { std::cout << str << "\n"; } }; public: using PublicInner = PrivateInner; }; //Test::PrivateInner priv("Hello world"); // Ok, private so we can't use that Test::PublicInner publ("Hello World"); // ?, by using public alias we can access private type, …