c++ - how to resolve g++ warning with -std=c++11: ‘auto_ptr’ is deprecated -


this question has answer here:

trying out -std=c++11 g++ compiler, got lots of

warning: ‘auto_ptr’ deprecated (declared @  /usr/include/c++/4.8/backward/auto_ptr.h:87) [-wdeprecated-declarations] 

what should use instead of auto_ptr? please give informative link or complete answer.

you may use std::unique_ptr instead of std::auto_ptr

and if copied auto_ptr, have std::move unique_ptr.


Comments

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -