Remove boost::detail::sp_nullptr_t

This commit is contained in:
Peter Dimov
2024-09-24 19:11:15 +03:00
parent 569b07b91c
commit 0e6dd82e8e
9 changed files with 15 additions and 65 deletions

View File

@ -9,7 +9,6 @@ Distributed under the Boost Software License, Version 1.0.
#define BOOST_SMART_PTR_ALLOCATE_UNIQUE_HPP
#include <boost/smart_ptr/detail/sp_noexcept.hpp>
#include <boost/smart_ptr/detail/sp_nullptr_t.hpp>
#include <boost/core/allocator_access.hpp>
#include <boost/core/alloc_construct.hpp>
#include <boost/core/empty_value.hpp>
@ -27,6 +26,7 @@ Distributed under the Boost Software License, Version 1.0.
#include <boost/config.hpp>
#include <memory>
#include <utility>
#include <cstddef>
namespace boost {
namespace detail {

View File

@ -1,41 +0,0 @@
#ifndef BOOST_SMART_PTR_DETAIL_SP_NULLPTR_T_HPP_INCLUDED
#define BOOST_SMART_PTR_DETAIL_SP_NULLPTR_T_HPP_INCLUDED
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
// detail/sp_nullptr_t.hpp
//
// Copyright 2013 Peter Dimov
//
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt
#include <boost/config.hpp>
#include <cstddef>
namespace boost
{
namespace detail
{
#if !defined( BOOST_NO_CXX11_DECLTYPE ) && ( ( defined( __clang__ ) && !defined( _LIBCPP_VERSION ) ) || defined( __INTEL_COMPILER ) )
typedef decltype(nullptr) sp_nullptr_t;
#else
typedef std::nullptr_t sp_nullptr_t;
#endif
} // namespace detail
} // namespace boost
#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_NULLPTR_T_HPP_INCLUDED

View File

@ -14,7 +14,6 @@
//
#include <boost/smart_ptr/detail/sp_convertible.hpp>
#include <boost/smart_ptr/detail/sp_nullptr_t.hpp>
#include <boost/smart_ptr/detail/sp_noexcept.hpp>
#include <boost/assert.hpp>
#include <boost/config.hpp>
@ -22,6 +21,7 @@
#include <functional> // for std::less
#include <iosfwd> // for std::basic_ostream
#include <cstddef>
namespace boost
{

View File

@ -10,12 +10,10 @@
//
// See http://www.boost.org/libs/smart_ptr/ for documentation.
#include <boost/config.hpp>
#include <boost/assert.hpp>
#include <boost/core/checked_delete.hpp>
#include <boost/smart_ptr/detail/sp_nullptr_t.hpp>
#include <boost/smart_ptr/detail/sp_noexcept.hpp>
#include <boost/core/checked_delete.hpp>
#include <boost/assert.hpp>
#include <boost/config.hpp>
#include <boost/config/workaround.hpp>
#include <cstddef> // for std::ptrdiff_t

View File

@ -10,13 +10,13 @@
//
// See http://www.boost.org/libs/smart_ptr/ for documentation.
#include <boost/config.hpp>
#include <boost/assert.hpp>
#include <boost/core/checked_delete.hpp>
#include <boost/smart_ptr/detail/sp_nullptr_t.hpp>
#include <boost/smart_ptr/detail/sp_disable_deprecated.hpp>
#include <boost/smart_ptr/detail/sp_noexcept.hpp>
#include <boost/core/checked_delete.hpp>
#include <boost/assert.hpp>
#include <boost/config/workaround.hpp>
#include <boost/config.hpp>
#include <cstddef>
#ifndef BOOST_NO_AUTO_PTR
# include <memory> // for std::auto_ptr

View File

@ -14,22 +14,17 @@
// See http://www.boost.org/libs/smart_ptr/ for documentation.
//
#include <boost/config.hpp> // for broken compiler workarounds
#include <memory> // TR1 cyclic inclusion fix
#include <boost/assert.hpp>
#include <boost/core/checked_delete.hpp>
#include <boost/smart_ptr/shared_ptr.hpp>
#include <boost/smart_ptr/detail/shared_count.hpp>
#include <boost/smart_ptr/detail/sp_nullptr_t.hpp>
#include <boost/smart_ptr/detail/sp_noexcept.hpp>
#include <boost/core/checked_delete.hpp>
#include <boost/assert.hpp>
#include <boost/config.hpp>
#include <boost/config/workaround.hpp>
#include <cstddef> // for std::ptrdiff_t
#include <algorithm> // for std::swap
#include <functional> // for std::less
#include <cstddef> // for std::ptrdiff_t
namespace boost
{

View File

@ -16,7 +16,6 @@
#include <boost/smart_ptr/detail/shared_count.hpp>
#include <boost/smart_ptr/detail/sp_convertible.hpp>
#include <boost/smart_ptr/detail/sp_nullptr_t.hpp>
#include <boost/smart_ptr/detail/sp_disable_deprecated.hpp>
#include <boost/smart_ptr/detail/sp_noexcept.hpp>
#include <boost/core/checked_delete.hpp>

View File

@ -222,7 +222,7 @@ static void deleter_constructor()
// nullptr_deleter_constructor
void deleter3( boost::detail::sp_nullptr_t )
void deleter3( std::nullptr_t )
{
++m;
}

View File

@ -9,7 +9,6 @@
//
#include <boost/shared_ptr.hpp>
#include <boost/smart_ptr/detail/sp_nullptr_t.hpp>
#include <boost/core/lightweight_test.hpp>
#include <cstddef>
#include <memory>
@ -36,7 +35,7 @@ private:
int X::instances = 0;
void f( boost::detail::sp_nullptr_t )
void f( std::nullptr_t )
{
}