shared_ptr in std::tr1

主宰稳场 提交于 2019-12-21 09:03:47

问题


I am working on a platform with a gcc compiler however boost cannot compile on it.

I am wondering what is the proper way to include the shared_ptr in std:tr1 on gcc? the file i looked in said not to include it directly, from what i can tell no other file includes it either :|


回答1:


In G++ 4.3,

#include <tr1/memory>

should do the trick. You'll find shared_ptr at std::tr1::shared_ptr.




回答2:


Boost itself has the answer.




回答3:


Boost can not compile on it? Most of the boost library doesn't need to be compiled to be used, and I guess shared_ptr doesn't either.



来源:https://stackoverflow.com/questions/471438/shared-ptr-in-stdtr1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!