摘要:
#include "boost/smart_ptr.hpp"相当于同时 include 了各个智能指针(请查看smart_ptr.hpp源文件)class User{ void print() { std::cout<<"test"<<std::endl; }};int main(){typedef boost::share_ptr<User> UserPtr; boost::shared_ptr<User>(new User) user_ptr1;boost::shared_ptr<User> 阅读全文