Remove uses of BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX

This commit is contained in:
Peter Dimov
2024-09-25 18:08:57 +03:00
parent 000c7ae5ac
commit abb0071ca6
5 changed files with 6 additions and 50 deletions

View File

@@ -57,8 +57,6 @@ private:
public: public:
#if !defined( BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX ) && !defined( BOOST_NO_CXX11_CONSTEXPR )
constexpr atomic_shared_ptr() BOOST_SP_NOEXCEPT: l_ BOOST_DETAIL_SPINLOCK_INIT constexpr atomic_shared_ptr() BOOST_SP_NOEXCEPT: l_ BOOST_DETAIL_SPINLOCK_INIT
{ {
} }
@@ -68,23 +66,6 @@ public:
{ {
} }
#else
atomic_shared_ptr() BOOST_SP_NOEXCEPT
{
boost::detail::spinlock init = BOOST_DETAIL_SPINLOCK_INIT;
std::memcpy( &l_, &init, sizeof( init ) );
}
atomic_shared_ptr( shared_ptr<T> p ) BOOST_SP_NOEXCEPT
: p_( std::move( p ) )
{
boost::detail::spinlock init = BOOST_DETAIL_SPINLOCK_INIT;
std::memcpy( &l_, &init, sizeof( init ) );
}
#endif
atomic_shared_ptr& operator=( shared_ptr<T> r ) BOOST_SP_NOEXCEPT atomic_shared_ptr& operator=( shared_ptr<T> r ) BOOST_SP_NOEXCEPT
{ {
boost::detail::spinlock::scoped_lock lock( l_ ); boost::detail::spinlock::scoped_lock lock( l_ );

View File

@@ -5,10 +5,9 @@ Copyright 2012-2015 Glen Joseph Fernandes
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt) (http://www.boost.org/LICENSE_1_0.txt)
*/ */
#include <boost/config.hpp>
#if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX)
#include <boost/core/lightweight_test.hpp>
#include <boost/smart_ptr/make_shared.hpp> #include <boost/smart_ptr/make_shared.hpp>
#include <boost/core/lightweight_test.hpp>
#include <boost/config.hpp>
template<class T = void> template<class T = void>
struct creator { struct creator {
@@ -83,9 +82,3 @@ int main()
} }
return boost::report_errors(); return boost::report_errors();
} }
#else
int main()
{
return 0;
}
#endif

View File

@@ -13,12 +13,7 @@
#include <boost/config/pragma_message.hpp> #include <boost/config/pragma_message.hpp>
#include <boost/config/helper_macros.hpp> #include <boost/config/helper_macros.hpp>
#if defined( BOOST_NO_CXX11_CONSTEXPR ) #if BOOST_WORKAROUND( BOOST_MSVC, < 1930 )
BOOST_PRAGMA_MESSAGE("Skipping test due to BOOST_NO_CXX11_CONSTEXPR")
int main() {}
#elif BOOST_WORKAROUND( BOOST_MSVC, < 1930 )
// MSVC does not implement static initialization for constexpr constructors // MSVC does not implement static initialization for constexpr constructors
BOOST_PRAGMA_MESSAGE("Skipping test due to BOOST_MSVC < 1930") BOOST_PRAGMA_MESSAGE("Skipping test due to BOOST_MSVC < 1930")
@@ -36,11 +31,6 @@ int main() {}
BOOST_PRAGMA_MESSAGE("Skipping test due to _LIBCPP_VERSION " BOOST_STRINGIZE(_LIBCPP_VERSION)) BOOST_PRAGMA_MESSAGE("Skipping test due to _LIBCPP_VERSION " BOOST_STRINGIZE(_LIBCPP_VERSION))
int main() {} int main() {}
#elif defined( BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX )
BOOST_PRAGMA_MESSAGE("Skipping test due to BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX")
int main() {}
#else #else
#include <boost/smart_ptr/atomic_shared_ptr.hpp> #include <boost/smart_ptr/atomic_shared_ptr.hpp>

View File

@@ -5,10 +5,9 @@ Copyright 2012-2015 Glen Joseph Fernandes
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(http://www.boost.org/LICENSE_1_0.txt) (http://www.boost.org/LICENSE_1_0.txt)
*/ */
#include <boost/config.hpp>
#if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX)
#include <boost/core/lightweight_test.hpp>
#include <boost/smart_ptr/make_shared.hpp> #include <boost/smart_ptr/make_shared.hpp>
#include <boost/core/lightweight_test.hpp>
#include <boost/config.hpp>
int main() int main()
{ {
@@ -46,9 +45,3 @@ int main()
} }
return boost::report_errors(); return boost::report_errors();
} }
#else
int main()
{
return 0;
}
#endif

View File

@@ -29,7 +29,6 @@ int main()
BOOST_TEST(result->x == 0); BOOST_TEST(result->x == 0);
BOOST_TEST(result->y == 0); BOOST_TEST(result->y == 0);
} }
#if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX)
{ {
std::unique_ptr<type> result = std::unique_ptr<type> result =
boost::make_unique<type>({ 1, 2 }); boost::make_unique<type>({ 1, 2 });
@@ -44,6 +43,6 @@ int main()
BOOST_TEST(result->x == 1); BOOST_TEST(result->x == 1);
BOOST_TEST(result->y == 2); BOOST_TEST(result->y == 2);
} }
#endif
return boost::report_errors(); return boost::report_errors();
} }