diff options
author | Tobias Markmann <tm@ayena.de> | 2014-10-19 20:22:58 (GMT) |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2014-10-20 13:49:33 (GMT) |
commit | 6b22dfcf59474dd016a0355a3102a1dd3692d92c (patch) | |
tree | 2b1fd33be433a91e81fee84fdc2bf1b52575d934 /3rdParty/Boost/src/boost/smart_ptr/scoped_ptr.hpp | |
parent | 38b0cb785fea8eae5e48fae56440695fdfd10ee1 (diff) | |
download | swift-6b22dfcf59474dd016a0355a3102a1dd3692d92c.zip swift-6b22dfcf59474dd016a0355a3102a1dd3692d92c.tar.bz2 |
Update Boost in 3rdParty to version 1.56.0.
This updates Boost in our 3rdParty directory to version 1.56.0.
Updated our update.sh script to stop on error.
Changed error reporting in SwiftTools/CrashReporter.cpp to SWIFT_LOG due to
missing include of <iostream> with newer Boost.
Change-Id: I4b35c77de951333979a524097f35f5f83d325edc
Diffstat (limited to '3rdParty/Boost/src/boost/smart_ptr/scoped_ptr.hpp')
-rw-r--r-- | 3rdParty/Boost/src/boost/smart_ptr/scoped_ptr.hpp | 36 |
1 files changed, 31 insertions, 5 deletions
diff --git a/3rdParty/Boost/src/boost/smart_ptr/scoped_ptr.hpp b/3rdParty/Boost/src/boost/smart_ptr/scoped_ptr.hpp index df479e5..be6722d 100644 --- a/3rdParty/Boost/src/boost/smart_ptr/scoped_ptr.hpp +++ b/3rdParty/Boost/src/boost/smart_ptr/scoped_ptr.hpp @@ -11,8 +11,10 @@ // http://www.boost.org/libs/smart_ptr/scoped_ptr.htm // +#include <boost/config.hpp> #include <boost/assert.hpp> #include <boost/checked_delete.hpp> +#include <boost/smart_ptr/detail/sp_nullptr_t.hpp> #include <boost/detail/workaround.hpp> #ifndef BOOST_NO_AUTO_PTR @@ -63,7 +65,7 @@ public: #ifndef BOOST_NO_AUTO_PTR - explicit scoped_ptr( std::auto_ptr<T> p ): px( p.release() ) // never throws + explicit scoped_ptr( std::auto_ptr<T> p ) BOOST_NOEXCEPT : px( p.release() ) { #if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) boost::sp_scalar_constructor_hook( px ); @@ -98,7 +100,7 @@ public: return px; } - T * get() const // never throws + T * get() const BOOST_NOEXCEPT { return px; } @@ -106,7 +108,7 @@ public: // implicit conversion to "bool" #include <boost/smart_ptr/detail/operator_bool.hpp> - void swap(scoped_ptr & b) // never throws + void swap(scoped_ptr & b) BOOST_NOEXCEPT { T * tmp = b.px; b.px = px; @@ -114,14 +116,38 @@ public: } }; -template<class T> inline void swap(scoped_ptr<T> & a, scoped_ptr<T> & b) // never throws +#if !defined( BOOST_NO_CXX11_NULLPTR ) + +template<class T> inline bool operator==( scoped_ptr<T> const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT +{ + return p.get() == 0; +} + +template<class T> inline bool operator==( boost::detail::sp_nullptr_t, scoped_ptr<T> const & p ) BOOST_NOEXCEPT +{ + return p.get() == 0; +} + +template<class T> inline bool operator!=( scoped_ptr<T> const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT +{ + return p.get() != 0; +} + +template<class T> inline bool operator!=( boost::detail::sp_nullptr_t, scoped_ptr<T> const & p ) BOOST_NOEXCEPT +{ + return p.get() != 0; +} + +#endif + +template<class T> inline void swap(scoped_ptr<T> & a, scoped_ptr<T> & b) BOOST_NOEXCEPT { a.swap(b); } // get_pointer(p) is a generic way to say p.get() -template<class T> inline T * get_pointer(scoped_ptr<T> const & p) +template<class T> inline T * get_pointer(scoped_ptr<T> const & p) BOOST_NOEXCEPT { return p.get(); } |