Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: unavailability of unique pointer in the latest c++ version  (Read 2482 times)

0 Members and 1 Guest are viewing this topic.

Anand

  • Newbie
  • *
  • Posts: 11
    • View Profile
unavailability of unique pointer in the latest c++ version
« on: March 18, 2016, 01:34:35 pm »
in visual studio 2015 unique pointers i.e. std::unique_ptr is not available. is there any alternative for it.

Satus

  • Guest
Re: unavailability of unique pointer in the latest c++ version
« Reply #1 on: March 18, 2016, 02:06:16 pm »
They are available even in 2012, what are you talking about?

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Re: unavailability of unique pointer in the latest c++ version
« Reply #2 on: March 18, 2016, 02:31:30 pm »
Of course they're available. And I don't see how this is related to SFML in the slightest...
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

ka0s420

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
    • Email
Re: unavailability of unique pointer in the latest c++ version
« Reply #3 on: March 18, 2016, 04:47:13 pm »
like everyone else has said, they are totally included.

have you done #include <memory> ?

Ungod

  • Newbie
  • *
  • Posts: 44
    • View Profile
Re: unavailability of unique pointer in the latest c++ version
« Reply #4 on: March 18, 2016, 09:42:15 pm »
Alternative is always Object* and take care of the delete by yourself.

I addition to what the others said: Is your compiler c++11 ready?

ka0s420

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
    • Email
Re: unavailability of unique pointer in the latest c++ version
« Reply #5 on: March 18, 2016, 10:12:28 pm »
it's visual studio 2015, so yes, it is compatible. As someone else already said, smart pointers have been in visual c++ since vs2012.

 

anything