From 5e7fdf5ec5eca7b562dd1a56409f49e7ed2d1896 Mon Sep 17 00:00:00 2001 From: Andrzej Krzemienski Date: Wed, 16 Oct 2024 23:42:56 +0200 Subject: [PATCH] Clean remnants of StaticAssert and mpl --- include/boost/optional/detail/optional_utility.hpp | 2 -- include/boost/optional/optional.hpp | 1 - test/CMakeLists.txt | 2 +- test/Jamfile.v2 | 4 ++-- test/optional_test.cpp | 2 -- test/optional_test_noexcept_move.cpp | 1 - 6 files changed, 3 insertions(+), 9 deletions(-) diff --git a/include/boost/optional/detail/optional_utility.hpp b/include/boost/optional/detail/optional_utility.hpp index 581a7e7c..f7c04ffe 100644 --- a/include/boost/optional/detail/optional_utility.hpp +++ b/include/boost/optional/detail/optional_utility.hpp @@ -25,9 +25,7 @@ inline constexpr T&& forward(typename boost::remove_reference::type& t) noexc template inline constexpr T&& forward(typename boost::remove_reference::type&& t) noexcept { -#ifndef BOOST_NO_CXX11_STATIC_ASSERT static_assert(!boost::is_lvalue_reference::value, "Can not forward an rvalue as an lvalue."); -#endif return static_cast(t); } diff --git a/include/boost/optional/optional.hpp b/include/boost/optional/optional.hpp index 0fd44480..b8f402d8 100644 --- a/include/boost/optional/optional.hpp +++ b/include/boost/optional/optional.hpp @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index eedb6f8c..9a030809 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -6,6 +6,6 @@ include(BoostTestJamfile OPTIONAL RESULT_VARIABLE HAVE_BOOST_TEST) if(HAVE_BOOST_TEST) -boost_test_jamfile(FILE Jamfile.v2 LINK_LIBRARIES Boost::optional Boost::core Boost::bind Boost::mpl Boost::tuple) +boost_test_jamfile(FILE Jamfile.v2 LINK_LIBRARIES Boost::optional Boost::core Boost::bind Boost::tuple) endif() diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 33c3f25f..21ea8d38 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -26,14 +26,14 @@ project cxx11_defaulted_moves cxx11_deleted_functions cxx11_explicit_conversion_operators - cxx11_noexcept +# cxx11_noexcept cxx11_rvalue_references cxx11_variadic_templates ] ; -run optional_test.cpp : : : /boost/bind//boost_bind /boost/mpl//boost_mpl ; +run optional_test.cpp : : : /boost/bind//boost_bind ; run optional_test_assign.cpp ; run optional_test_swap.cpp ; compile optional_test_wuninitialized.cpp ; diff --git a/test/optional_test.cpp b/test/optional_test.cpp index bd8f90fc..b7d96039 100644 --- a/test/optional_test.cpp +++ b/test/optional_test.cpp @@ -24,8 +24,6 @@ #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) #include "boost/bind/apply.hpp" // Included just to test proper interaction with boost::apply<> as reported by Daniel Wallin #endif -#include "boost/mpl/bool.hpp" -#include "boost/mpl/bool_fwd.hpp" // For mpl::true_ and mpl::false_ #include "boost/optional/optional.hpp" diff --git a/test/optional_test_noexcept_move.cpp b/test/optional_test_noexcept_move.cpp index 6ff8a9a9..3aba93ae 100644 --- a/test/optional_test_noexcept_move.cpp +++ b/test/optional_test_noexcept_move.cpp @@ -9,7 +9,6 @@ // You are welcome to contact the author at: // akrzemi1@gmail.com -#include "boost/static_assert.hpp" #include "boost/optional/optional.hpp" #ifdef BOOST_BORLANDC