Remove uses of BOOST_CONSTEXPR

This commit is contained in:
Peter Dimov
2024-10-03 18:31:59 +03:00
parent 890b661909
commit 1c988756d5
9 changed files with 20 additions and 22 deletions

View File

@ -59,7 +59,7 @@ struct sp_align_up {
};
template<class T>
BOOST_CONSTEXPR inline std::size_t
constexpr inline std::size_t
sp_objects(std::size_t size) noexcept
{
return (size + sizeof(T) - 1) / sizeof(T);
@ -101,7 +101,7 @@ public:
return allocator_;
}
BOOST_CONSTEXPR std::size_t size() const noexcept {
constexpr std::size_t size() const noexcept {
return N;
}

View File

@ -74,7 +74,7 @@ public:
return *this;
}
BOOST_CONSTEXPR bool is_lock_free() const noexcept
constexpr bool is_lock_free() const noexcept
{
return false;
}

View File

@ -42,11 +42,11 @@ private:
public:
BOOST_CONSTEXPR local_counted_base() noexcept: local_use_count_( initial_ )
constexpr local_counted_base() noexcept: local_use_count_( initial_ )
{
}
BOOST_CONSTEXPR local_counted_base( local_counted_base const & ) noexcept: local_use_count_( initial_ )
constexpr local_counted_base( local_counted_base const & ) noexcept: local_use_count_( initial_ )
{
}

View File

@ -120,14 +120,14 @@ private:
public:
BOOST_CONSTEXPR shared_count() noexcept: pi_(0)
constexpr shared_count() noexcept: pi_(0)
#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
, id_(shared_count_id)
#endif
{
}
BOOST_CONSTEXPR explicit shared_count( sp_counted_base * pi ) noexcept: pi_( pi )
constexpr explicit shared_count( sp_counted_base * pi ) noexcept: pi_( pi )
#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
, id_(shared_count_id)
#endif
@ -501,7 +501,7 @@ private:
public:
BOOST_CONSTEXPR weak_count() noexcept: pi_(0)
constexpr weak_count() noexcept: pi_(0)
#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
, id_(weak_count_id)
#endif

View File

@ -16,7 +16,6 @@
#include <boost/smart_ptr/weak_ptr.hpp>
#include <boost/smart_ptr/shared_ptr.hpp>
#include <boost/assert.hpp>
#include <boost/config.hpp>
namespace boost
{
@ -25,11 +24,11 @@ template<class T> class enable_shared_from_this
{
protected:
BOOST_CONSTEXPR enable_shared_from_this() noexcept
constexpr enable_shared_from_this() noexcept
{
}
BOOST_CONSTEXPR enable_shared_from_this(enable_shared_from_this const &) noexcept
constexpr enable_shared_from_this(enable_shared_from_this const &) noexcept
{
}

View File

@ -16,8 +16,6 @@
#include <boost/smart_ptr/detail/sp_convertible.hpp>
#include <boost/smart_ptr/detail/sp_noexcept.hpp>
#include <boost/assert.hpp>
#include <boost/config.hpp>
#include <boost/config/workaround.hpp>
#include <functional> // for std::less
#include <iosfwd> // for std::basic_ostream
@ -51,7 +49,7 @@ public:
typedef T element_type;
BOOST_CONSTEXPR intrusive_ptr() noexcept : px( 0 )
constexpr intrusive_ptr() noexcept : px( 0 )
{
}

View File

@ -13,6 +13,7 @@
#include <boost/smart_ptr/shared_ptr.hpp>
#include <boost/smart_ptr/detail/sp_noexcept.hpp>
#include <boost/assert.hpp>
namespace boost
{
@ -137,16 +138,16 @@ public:
// constructors
BOOST_CONSTEXPR local_shared_ptr() noexcept : px( 0 ), pn( 0 )
constexpr local_shared_ptr() noexcept : px( 0 ), pn( 0 )
{
}
BOOST_CONSTEXPR local_shared_ptr( std::nullptr_t ) noexcept : px( 0 ), pn( 0 )
constexpr local_shared_ptr( std::nullptr_t ) noexcept : px( 0 ), pn( 0 )
{
}
// internal constructor, used by make_shared
BOOST_CONSTEXPR local_shared_ptr( boost::detail::lsp_internal_constructor_tag, element_type * px_, boost::detail::local_counted_base * pn_ ) noexcept : px( px_ ), pn( pn_ )
constexpr local_shared_ptr( boost::detail::lsp_internal_constructor_tag, element_type * px_, boost::detail::local_counted_base * pn_ ) noexcept : px( px_ ), pn( pn_ )
{
}

View File

@ -261,19 +261,19 @@ public:
typedef typename boost::detail::sp_element< T >::type element_type;
BOOST_CONSTEXPR shared_ptr() noexcept : px( 0 ), pn()
constexpr shared_ptr() noexcept : px( 0 ), pn()
{
}
BOOST_CONSTEXPR shared_ptr( std::nullptr_t ) noexcept : px( 0 ), pn()
constexpr shared_ptr( std::nullptr_t ) noexcept : px( 0 ), pn()
{
}
BOOST_CONSTEXPR shared_ptr( boost::detail::sp_internal_constructor_tag, element_type * px_, boost::detail::shared_count const & pn_ ) noexcept : px( px_ ), pn( pn_ )
constexpr shared_ptr( boost::detail::sp_internal_constructor_tag, element_type * px_, boost::detail::shared_count const & pn_ ) noexcept : px( px_ ), pn( pn_ )
{
}
BOOST_CONSTEXPR shared_ptr( boost::detail::sp_internal_constructor_tag, element_type * px_, boost::detail::shared_count && pn_ ) noexcept : px( px_ ), pn( std::move( pn_ ) )
constexpr shared_ptr( boost::detail::sp_internal_constructor_tag, element_type * px_, boost::detail::shared_count && pn_ ) noexcept : px( px_ ), pn( std::move( pn_ ) )
{
}

View File

@ -32,7 +32,7 @@ public:
typedef typename boost::detail::sp_element< T >::type element_type;
BOOST_CONSTEXPR weak_ptr() noexcept : px(0), pn()
constexpr weak_ptr() noexcept : px(0), pn()
{
}