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

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -