diff --git a/Source/boost/scoped_ptr.hpp b/Source/boost/scoped_ptr.hpp index 836c197d..9390d396 100644 --- a/Source/boost/scoped_ptr.hpp +++ b/Source/boost/scoped_ptr.hpp @@ -19,7 +19,16 @@ #include "checked_delete.hpp" #include "detail/workaround.hpp" -#include // for std::auto_ptr +#include // for std::auto_ptr or std::unique_ptr + +// std::auto_ptr was deprecated in C++11 and removed in C++17 +namespace NSIS { namespace CXX { +#if __cplusplus >= 201103L +template struct stdsmartptr { typedef std::unique_ptr type; }; +#else +template struct stdsmartptr { typedef std::auto_ptr type; }; +#endif +}} //~ NSIS::CXX namespace boost { @@ -48,7 +57,7 @@ public: { } - explicit scoped_ptr(std::auto_ptr p): ptr(p.release()) // never throws + explicit scoped_ptr(typename NSIS::CXX::stdsmartptr::type p): ptr(p.release()) // never throws { }