How do I call ::std::make_shared on a class with only protected or private constructors?

This answer is probably better, and the one I’ll likely accept. But I also came up with a method that’s uglier, but does still let everything still be inline and doesn’t require a derived class: #include <memory> #include <string> class A { protected: struct this_is_private; public: explicit A(const this_is_private &) {} A(const this_is_private &, ::std::string, … Read more