Implementing Factory Function with STL by Replicating Abseil Example

Trying to better understand Tip of the Week #42: Prefer Factory Functions to Initializer Methods by replicating the example using the standard template library. OP provides the example code: // foo.h class Foo { public: // Factory method: creates and returns a Foo. // May return null on failure. static std::unique_ptr<Foo> Create(); // Foo is… Read More Implementing Factory Function with STL by Replicating Abseil Example