No-op deallocator for boost::shared_ptr

后端 未结 6 1575
情书的邮戳
情书的邮戳 2020-12-30 02:39

Is there a stock no-op deallocator in Boost to use with boost::shared_ptr for static objects, etc.

I know it\'s ultra-trivial to write, but I don\'t wan

6条回答
  •  长情又很酷
    2020-12-30 03:09

    • If Boost <= 1.54, use boost/log/utility/empty_deleter.hpp.
    • If Boost == 1.55, use boost/utility/empty_deleter.hpp.
    • If Boost >= 1.56, use boost/core/null_deleter.hpp.

提交回复
热议问题