It also doesn't work when Foo's constructor is private, even when called from a function that would have access to this private constructor.
And this is my beef with C++: Yes it's powerful, and I quite like it, but you sooner or later hit these speed bumps that unnecessarily complicate things.
It also doesn't work when Foo's constructor is private, even when called from a function that would have access to this private constructor.
And this is my beef with C++: Yes it's powerful, and I quite like it, but you sooner or later hit these speed bumps that unnecessarily complicate things.