Use BOOST_SP_NOEXCEPT, BOOST_SP_NOEXCEPT_WITH_ASSERT

This commit is contained in:
Peter Dimov committed 2017-06-12 18:06:54 +03:00
1 parent e75fa9329b
commit 52d976fde2
15 files changed
+264 -246

No files matched your search

@@ -44,7 +44,7 @@ private:
public:
BOOST_CONSTEXPR local_counted_base() BOOST_NOEXCEPT: local_use_count_( initial_ )
BOOST_CONSTEXPR local_counted_base() BOOST_SP_NOEXCEPT: local_use_count_( initial_ )
{
}
@@ -75,7 +75,7 @@ public:
}
}
long local_use_count() const BOOST_NOEXCEPT
long local_use_count() const BOOST_SP_NOEXCEPT
{
return local_use_count_;
}
@@ -9,14 +9,14 @@
#if !defined( BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS ) && !defined( BOOST_NO_CXX11_NULLPTR )\
&& !(defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x5130))
explicit operator bool () const BOOST_NOEXCEPT
explicit operator bool () const BOOST_SP_NOEXCEPT
{
return px != 0;
}
#elif ( defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, < 0x570) ) || defined(__CINT__)
operator bool () const BOOST_NOEXCEPT
operator bool () const BOOST_SP_NOEXCEPT
{
return px != 0;
}
@@ -29,7 +29,7 @@
typedef void (*unspecified_bool_type)( this_type*** );
operator unspecified_bool_type() const BOOST_NOEXCEPT
operator unspecified_bool_type() const BOOST_SP_NOEXCEPT
{
return px == 0? 0: unspecified_bool;
}
@@ -41,7 +41,7 @@
typedef element_type * (this_type::*unspecified_bool_type)() const;
operator unspecified_bool_type() const BOOST_NOEXCEPT
operator unspecified_bool_type() const BOOST_SP_NOEXCEPT
{
return px == 0? 0: &this_type::get;
}
@@ -50,7 +50,7 @@
typedef element_type * this_type::*unspecified_bool_type;
operator unspecified_bool_type() const BOOST_NOEXCEPT
operator unspecified_bool_type() const BOOST_SP_NOEXCEPT
{
return px == 0? 0: &this_type::px;
}
@@ -58,7 +58,7 @@
#endif
// operator! is redundant, but some compilers need it
bool operator! () const BOOST_NOEXCEPT
bool operator! () const BOOST_SP_NOEXCEPT
{
return px == 0;
}
+21 -3
View File
@@ -9,7 +9,7 @@
// detail/sp_noexcept.hpp
//
// Copyright 2016 Peter Dimov
// Copyright 2016, 2017 Peter Dimov
//
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE_1_0.txt or copy at
@@ -17,13 +17,31 @@
#include <boost/config.hpp>
// BOOST_SP_NOEXCEPT
#if defined( BOOST_MSVC ) && BOOST_MSVC >= 1700 && BOOST_MSVC < 1900
#define BOOST_SP_NOEXCEPT BOOST_NOEXCEPT_OR_NOTHROW
# define BOOST_SP_NOEXCEPT BOOST_NOEXCEPT_OR_NOTHROW
#else
#define BOOST_SP_NOEXCEPT BOOST_NOEXCEPT
# define BOOST_SP_NOEXCEPT BOOST_NOEXCEPT
#endif
// BOOST_SP_NOEXCEPT_WITH_ASSERT
#if defined(BOOST_DISABLE_ASSERTS) || ( defined(BOOST_ENABLE_ASSERT_DEBUG_HANDLER) && defined(NDEBUG) )
# define BOOST_SP_NOEXCEPT_WITH_ASSERT BOOST_SP_NOEXCEPT
#elif defined(BOOST_ENABLE_ASSERT_HANDLER) || ( defined(BOOST_ENABLE_ASSERT_DEBUG_HANDLER) && !defined(NDEBUG) )
# define BOOST_SP_NOEXCEPT_WITH_ASSERT
#else
# define BOOST_SP_NOEXCEPT_WITH_ASSERT BOOST_SP_NOEXCEPT
#endif