shared_ptr in std::tr1

user34537 picture user34537 · Jan 23, 2009 · Viewed 8.8k times · Source

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 :|

Answer

bdonlan picture bdonlan · May 5, 2009

In G++ 4.3,

#include <tr1/memory>

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