Menu

#6 Fix deprecated auto_ptr warnings

open
Bug (3)
5
2012-06-04
2012-06-04
No

unique_ptr seems to work fine as a drop in replacement in this particular case

After #include <memory>

add

#if __cplusplus > 201100L
using std::unique_ptr;
#else
#ifdef __GXX_EXPERIMENTAL_CXX0X__
using std::unique_ptr;
#else
#include <tr1/memory>
using std::tr1::unique_ptr;
#endif
#endif

... then change all instances of std::auto_ptr to unique_ptr

in files urdl-0.1/include/urdl/option_set.hpp urdl-0.1/include/urdl/impl/option_set.ipp

This library works GREAT... You can just pass lambdas as handlers and contain all your logic in one nice little wrapper function and everything just works as expected.

Discussion


Log in to post a comment.