Questions marquées «access-modifiers»

12
Alias ​​public pour le type non public

Je me demande si c'est du C ++ valide: 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...