Last active
December 20, 2015 12:44
-
-
Save taeguk/1f8c648ee76e72413cc7 to your computer and use it in GitHub Desktop.
aa.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class A { | |
private: | |
A() {}; | |
public: | |
static A factory_A() { reutrn A(); } | |
} | |
// friend declaration for std::make_shared | |
// works on VS2010 | |
friend std::tr1::_Ref_count_obj<T> | |
// works on VS2015 | |
friend std::_Ref_count_obj<PngImage>; | |
class A { | |
private: | |
A() {}; | |
class PrivateKey() {}; | |
public: | |
A(PrivateKey) : A() {} | |
static std::shared_ptr<A> factory_A() { reutrn make_shared<A>(PrivateKey()); } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment