Boost::shared_ptr is really great. But using it you need lots of header file. Is thare any single header file available that will provide shared_ptr function开发者_运维百科ality?
somewhat urgent.
If you want to avoid having all the boost header files although you use shared_ptr only, you can extract the shared_ptr with BCP:
http://www.boost.org/doc/libs/1_36_0/tools/bcp/bcp.html
It won't give you a single header file, though, but I doubt that this would give you any noticeable advantage.
gcc -E boost/shared_ptr.hpp -o my_shared_ptr.hpp
Using the preprocessor, you generate a single header containing everything you need.
精彩评论