drop c++03 support

This commit is contained in:
Antony Polukhin committed 2023-08-10 18:52:03 +03:00
1 parent a1104f580c
commit 2598281d10
7 files changed
+30 -94

No files matched your search

+12 -26
View File
@@ -49,38 +49,24 @@
#ifndef BOOST_POLYMORPHIC_CAST_HPP
#define BOOST_POLYMORPHIC_CAST_HPP
# include <boost/config.hpp>
#include <boost/config/assert_cxx11.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
# pragma once
#endif
#include <boost/config/pragma_message.hpp>
#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || \
defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) || \
defined(BOOST_NO_CXX11_CONSTEXPR) || \
defined(BOOST_NO_CXX11_NULLPTR) || \
defined(BOOST_NO_CXX11_NOEXCEPT) || \
defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || \
defined(BOOST_NO_CXX11_FINAL) || \
defined(BOOST_NO_CXX11_ALIGNOF) || \
defined(BOOST_NO_CXX11_STATIC_ASSERT) || \
defined(BOOST_NO_CXX11_SMART_PTR) || \
defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) || \
defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS)
BOOST_PRAGMA_MESSAGE("C++03 support is deprecated in Boost.Conversion 1.82 and will be removed in Boost.Conversion 1.84.")
#if defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS)
#error C++03 support is removed in Boost.Conversion 1.84
#endif
# include <boost/assert.hpp>
# include <boost/core/addressof.hpp>
# include <boost/core/enable_if.hpp>
# include <boost/throw_exception.hpp>
# include <boost/type_traits/is_reference.hpp>
# include <boost/type_traits/remove_reference.hpp>
# include <boost/assert.hpp>
# include <boost/throw_exception.hpp>
# include <memory> // std::addressof
# include <typeinfo>
# include <type_traits>
namespace boost
{
@@ -129,13 +115,13 @@ namespace boost
// Contributed by Julien Delacroix
template <class Target, class Source>
inline typename boost::enable_if_c<
boost::is_reference<Target>::value, Target
inline typename std::enable_if<
std::is_reference<Target>::value, Target
>::type polymorphic_downcast(Source& x)
{
typedef typename boost::remove_reference<Target>::type* target_pointer_type;
typedef typename std::remove_reference<Target>::type* target_pointer_type;
return *boost::polymorphic_downcast<target_pointer_type>(
boost::addressof(x)
std::addressof(x)
);
}