SFML community forums

Help => General => Topic started by: Anand on March 18, 2016, 01:34:35 pm

Title: unavailability of unique pointer in the latest c++ version
Post by: Anand 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.
Title: Re: unavailability of unique pointer in the latest c++ version
Post by: Satus on March 18, 2016, 02:06:16 pm
They are available even in 2012, what are you talking about?
Title: Re: unavailability of unique pointer in the latest c++ version
Post by: Nexus 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...
Title: Re: unavailability of unique pointer in the latest c++ version
Post by: ka0s420 on March 18, 2016, 04:47:13 pm
like everyone else has said, they are totally included.

have you done #include <memory> ?
Title: Re: unavailability of unique pointer in the latest c++ version
Post by: Ungod 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?
Title: Re: unavailability of unique pointer in the latest c++ version
Post by: ka0s420 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.