Using gcc with -std=c++11
pkg-config libxml++-2.6 --modversion
2.40.1
get lots of warnings like this: /usr/include/libxml++-2.6/libxml++/parsers/saxparser.h:224:8: warning: 'template class std::auto_ptr' is deprecated [-Wdeprecated-declarations]
I'll ignore this warning. Would anybody do otherwise ?
You should be safe ignoring the std::auto_ptr
warning. Prior to C++11, auto_ptr
was a common way to manage memory, because it takes ownership of a pointer. Post C++11 it's recommended to use the new smart pointers that are part of STL (ie std::unique_ptr
, std::shared_ptr
).
This question has a good discussion on std::auto_ptr
and issues that led to it being deprecated. I wouldn't write new code using it, but existing code using auto_ptr
should be safe (assuming there aren't bugs to begin with which may or may not be valid).