22

In c++0x shared_ptr will be moved from tr1 into std. So which header to include to get it?

I am using g++ 4.5 (ubuntu 10.10)

BЈовић
  • 62,405
  • 41
  • 173
  • 273

2 Answers2

27

You'll find it in <memory> now.

Fred Foo
  • 355,277
  • 75
  • 744
  • 836
  • If you want cross-platform compatibility (I can vouch for OS X) you might need to prefix it with `` for now; and that should remain valid. – Richard Apr 07 '11 at 19:33
2
  1. headfile is memory;
  2. It's defined in namespace std;
  3. You need specify -std=c++0x
rensq
  • 101
  • 4