Teach now or later shared_ptr<> and unique_ptr<>?

  • (2 Pages)
  • +
  • 1
  • 2

15 Replies - 9070 Views - Last Post: 27 August 2012 - 06:28 AM

#16 ishkabible  Icon User is offline

  • spelling expret
  • member icon




Reputation: 1622
  • View blog
  • Posts: 5,709
  • Joined: 03-August 09

Re: Teach now or later shared_ptr<> and unique_ptr<>?

Posted 27 August 2012 - 06:28 AM

guess what I just found out; there is no array specialization for shared_ptr; there is only one for unique_ptr.

not sure why though; it seems to me that std::vector covers more than unique_ptr<T[]> where as a shared_ptr<T[]> would be extremely useful in shared arrays...of course there is shared_ptr<std::vector<T>> I guess.

unique_ptr and shared_ptr would have lower overhead however :/

I think I'm going to write a specialization for shared_ptr later today; shouldn't be to hard.
Was This Post Helpful? 1
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2