mirror of
https://github.com/boostorg/smart_ptr.git
synced 2025-07-30 12:47:28 +02:00
Remove uses of BOOST_CONSTEXPR
This commit is contained in:
@ -59,7 +59,7 @@ struct sp_align_up {
|
|||||||
};
|
};
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
BOOST_CONSTEXPR inline std::size_t
|
constexpr inline std::size_t
|
||||||
sp_objects(std::size_t size) noexcept
|
sp_objects(std::size_t size) noexcept
|
||||||
{
|
{
|
||||||
return (size + sizeof(T) - 1) / sizeof(T);
|
return (size + sizeof(T) - 1) / sizeof(T);
|
||||||
@ -101,7 +101,7 @@ public:
|
|||||||
return allocator_;
|
return allocator_;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOST_CONSTEXPR std::size_t size() const noexcept {
|
constexpr std::size_t size() const noexcept {
|
||||||
return N;
|
return N;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ public:
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOST_CONSTEXPR bool is_lock_free() const noexcept
|
constexpr bool is_lock_free() const noexcept
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -42,11 +42,11 @@ private:
|
|||||||
|
|
||||||
public:
|
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_ )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,14 +120,14 @@ private:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
BOOST_CONSTEXPR shared_count() noexcept: pi_(0)
|
constexpr shared_count() noexcept: pi_(0)
|
||||||
#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
|
#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
|
||||||
, id_(shared_count_id)
|
, id_(shared_count_id)
|
||||||
#endif
|
#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)
|
#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
|
||||||
, id_(shared_count_id)
|
, id_(shared_count_id)
|
||||||
#endif
|
#endif
|
||||||
@ -501,7 +501,7 @@ private:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
BOOST_CONSTEXPR weak_count() noexcept: pi_(0)
|
constexpr weak_count() noexcept: pi_(0)
|
||||||
#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
|
#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
|
||||||
, id_(weak_count_id)
|
, id_(weak_count_id)
|
||||||
#endif
|
#endif
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
#include <boost/smart_ptr/weak_ptr.hpp>
|
#include <boost/smart_ptr/weak_ptr.hpp>
|
||||||
#include <boost/smart_ptr/shared_ptr.hpp>
|
#include <boost/smart_ptr/shared_ptr.hpp>
|
||||||
#include <boost/assert.hpp>
|
#include <boost/assert.hpp>
|
||||||
#include <boost/config.hpp>
|
|
||||||
|
|
||||||
namespace boost
|
namespace boost
|
||||||
{
|
{
|
||||||
@ -25,11 +24,11 @@ template<class T> class enable_shared_from_this
|
|||||||
{
|
{
|
||||||
protected:
|
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
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,8 +16,6 @@
|
|||||||
#include <boost/smart_ptr/detail/sp_convertible.hpp>
|
#include <boost/smart_ptr/detail/sp_convertible.hpp>
|
||||||
#include <boost/smart_ptr/detail/sp_noexcept.hpp>
|
#include <boost/smart_ptr/detail/sp_noexcept.hpp>
|
||||||
#include <boost/assert.hpp>
|
#include <boost/assert.hpp>
|
||||||
#include <boost/config.hpp>
|
|
||||||
#include <boost/config/workaround.hpp>
|
|
||||||
|
|
||||||
#include <functional> // for std::less
|
#include <functional> // for std::less
|
||||||
#include <iosfwd> // for std::basic_ostream
|
#include <iosfwd> // for std::basic_ostream
|
||||||
@ -51,7 +49,7 @@ public:
|
|||||||
|
|
||||||
typedef T element_type;
|
typedef T element_type;
|
||||||
|
|
||||||
BOOST_CONSTEXPR intrusive_ptr() noexcept : px( 0 )
|
constexpr intrusive_ptr() noexcept : px( 0 )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
|
|
||||||
#include <boost/smart_ptr/shared_ptr.hpp>
|
#include <boost/smart_ptr/shared_ptr.hpp>
|
||||||
#include <boost/smart_ptr/detail/sp_noexcept.hpp>
|
#include <boost/smart_ptr/detail/sp_noexcept.hpp>
|
||||||
|
#include <boost/assert.hpp>
|
||||||
|
|
||||||
namespace boost
|
namespace boost
|
||||||
{
|
{
|
||||||
@ -137,16 +138,16 @@ public:
|
|||||||
|
|
||||||
// constructors
|
// 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
|
// 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_ )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -261,19 +261,19 @@ public:
|
|||||||
|
|
||||||
typedef typename boost::detail::sp_element< T >::type element_type;
|
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_ ) )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ public:
|
|||||||
|
|
||||||
typedef typename boost::detail::sp_element< T >::type element_type;
|
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()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user