2017-05-29から1日間の記事一覧
スマートポインタの定義 boost の smart pointer を使ってもよいのですが、 折角なので、ここでは独自に smart pointer を作成してみます。 template <class T> class PtrRef { private: int count; T *value; public: Ptr<T>(T *value) : count(0), value(value) {} Ptr<T></t></t></class>…
スマートポインタの定義 boost の smart pointer を使ってもよいのですが、 折角なので、ここでは独自に smart pointer を作成してみます。 template <class T> class PtrRef { private: int count; T *value; public: Ptr<T>(T *value) : count(0), value(value) {} Ptr<T></t></t></class>…