Using boost::shared_ptr in a library's public interface

前端 未结 10 2382
再見小時候
再見小時候 2021-02-14 05:31

We have a C++ library that we provide to several different clients. Recently we made the switch from using raw pointers in the public interface to using boost::sharedptr instead

10条回答
  •  无人及你
    2021-02-14 06:10

    You could use the boost copy utility to build a custom version of boost which had only the smart pointer class. Since the smart pointer class is a header-only library, this should result in a few headers that you could include with your library.

提交回复
热议问题