majintao0131 / yaml-cpp

Automatically exported from code.google.com/p/yaml-cpp
MIT License
0 stars 0 forks source link

Replace std::auto_ptr #101

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Compile with G++ and -std=c++0x

What is the expected output? What do you see instead?
Errors and warnings about std::auto_ptr being deprecated in C++0x.

What version of the product are you using? On what operating system?
yaml-cpp 0.2.5, Debian GNU/Linux Sid.

Please provide any additional information below.
Like said, std::auto_ptr will be deprecated in the future. It's proposed to use 
std::unique_ptr instead. It would be helpful if this great library would stick 
to them so I can continue compiling my source code without the -Wno-deprecated 
flag. ;-)

Original issue reported on code.google.com by mute...@googlemail.com on 18 Mar 2011 at 6:06

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I'd love to use `std::unique_ptr`! But unfortunately, it doesn't exist in 
C++03; the only option in the current standard is `std::auto_ptr`.

I imagine that eventually yaml-cpp will add some C++0x syntax/libraries, but 
for now (especially given that C++0x hasn't even been standardized yet), it'll 
stay C++03.

Sorry about this - you're on the cutting edge here :)

Original comment by jbe...@gmail.com on 18 Mar 2011 at 6:23

GoogleCodeExporter commented 9 years ago
Alright, makes sense to me. :) And since there's a workaround for it 
(-Wno-deprecated), I'm fine with it. Thanks for the comment and the lib in 
general.

Original comment by mute...@googlemail.com on 18 Mar 2011 at 8:50