摘要:
为什么deleter的类型是std::unique_ptr类型的一部分,而不是std::shared_ptr的一部分? std::unique_ptr<Widget, decltype(loggingDel) > upw(new Widget, loggingDel); std::shared_pt 阅读全文
摘要:
条款18中的完整代码: 点击查看代码 #include <iostream> #include <memory> #include <string> // 假设基础的 Investment 类和 Stock 类 class Investment { public: virtual ~Investme 阅读全文
摘要:
为什么deleter的类型是std::unique_ptr类型的一部分,而不是std::shared_ptr的一部分? std::unique_ptr<Widget, decltype(loggingDel) > upw(new Widget, loggingDel); std::shared_pt 阅读全文
摘要:
条款18中的完整代码: 点击查看代码 #include <iostream> #include <memory> #include <string> // 假设基础的 Investment 类和 Stock 类 class Investment { public: virtual ~Investme 阅读全文