1 Replies - 193 Views - Last Post: 26 March 2011 - 01:06 PM Rate Topic: -----

#1 diego_pmc  Icon User is offline

  • D.I.C Addict

Reputation: 81
  • View blog
  • Posts: 565
  • Joined: 13-May 09

Shared pointer

Posted 26 March 2011 - 12:55 PM

I want to use shared_ptr objects in my code, however I'm not sure it is a standard type or not. I noticed std::shared_ptr is defined in <memory>, but I'm not sure this is a standard header or if it's only available on certain compilers. Should I use boost::shared_ptr instead, if I want portable code?

This post has been edited by diego_pmc: 26 March 2011 - 01:07 PM


Is This A Good Question/Topic? 1
  • +

Replies To: Shared pointer

#2 jimblumberg  Icon User is online

  • member icon


Reputation: 3993
  • View blog
  • Posts: 12,322
  • Joined: 25-December 09

Re: Shared pointer

Posted 26 March 2011 - 01:06 PM

I don't believe shared_ptr is in the current standard. However it is in TR1 which is expected to be adopted into the new standard.

EDIT The shared_ptr that is to be included in the new standard is the Boost::shared_ptr.

Jim

This post has been edited by jimblumberg: 26 March 2011 - 01:10 PM

Was This Post Helpful? 1
  • +
  • -

Page 1 of 1