2016-05-26から1日間の記事一覧
shared_from_this()はコンストラクタで使えない。 つまり下のようなコードは動かない。 #include <memory> class A : public std::enable_shared_from_this { public: A() { auto self = shared_from_this(); ... } } だからこういう場合はshared_from_this()を含ん</memory>…
shared_from_this()はコンストラクタで使えない。 つまり下のようなコードは動かない。 #include <memory> class A : public std::enable_shared_from_this { public: A() { auto self = shared_from_this(); ... } } だからこういう場合はshared_from_this()を含ん</memory>…