From 3254a3857a8f36b5b66cfe3129b89cc8e698f74e Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sat, 27 Jan 2024 07:12:35 +0200 Subject: [PATCH] Remove BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX workarounds --- include/boost/function/detail/epilogue.hpp | 4 ---- include/boost/function/function_fwd.hpp | 7 ------- include/boost/function/function_template.hpp | 7 ------- test/contains_test.cpp | 4 ---- 4 files changed, 22 deletions(-) diff --git a/include/boost/function/detail/epilogue.hpp b/include/boost/function/detail/epilogue.hpp index 908788b..03cc3ae 100644 --- a/include/boost/function/detail/epilogue.hpp +++ b/include/boost/function/detail/epilogue.hpp @@ -10,8 +10,6 @@ // Resolve C++20 issue with fn == bind(...) // https://github.com/boostorg/function/issues/45 -#if !defined(BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX) - namespace boost { @@ -34,6 +32,4 @@ template bool operator!=( function const& } // namespace boost -#endif // #if !defined(BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX) - #endif // #ifndef BOOST_FUNCTION_EPILOGUE_HPP diff --git a/include/boost/function/function_fwd.hpp b/include/boost/function/function_fwd.hpp index e89b9c7..fccfecc 100644 --- a/include/boost/function/function_fwd.hpp +++ b/include/boost/function/function_fwd.hpp @@ -10,15 +10,9 @@ #define BOOST_FUNCTION_FWD_HPP #include -#if defined(BOOST_BCB_PARTIAL_SPECIALIZATION_BUG) \ - || !(defined(BOOST_STRICT_CONFIG) || !defined(__SUNPRO_CC) || __SUNPRO_CC > 0x540) -# define BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX -#endif - namespace boost { class bad_function_call; -#if !defined(BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX) // Preferred syntax template class function; @@ -27,7 +21,6 @@ namespace boost { { f1.swap(f2); } -#endif // have partial specialization // Portable syntax template class function_n; diff --git a/include/boost/function/function_template.hpp b/include/boost/function/function_template.hpp index a3a20ce..289f5b6 100644 --- a/include/boost/function/function_template.hpp +++ b/include/boost/function/function_template.hpp @@ -1020,13 +1020,7 @@ template R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_ARGS>& ); -#if !defined(BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX) - -#if BOOST_FUNCTION_NUM_ARGS == 0 -#define BOOST_FUNCTION_PARTIAL_SPEC R (void) -#else #define BOOST_FUNCTION_PARTIAL_SPEC R (BOOST_FUNCTION_TEMPLATE_ARGS) -#endif template @@ -1119,7 +1113,6 @@ public: }; #undef BOOST_FUNCTION_PARTIAL_SPEC -#endif // have partial specialization } // end namespace boost diff --git a/test/contains_test.cpp b/test/contains_test.cpp index f317364..7b96d64 100644 --- a/test/contains_test.cpp +++ b/test/contains_test.cpp @@ -133,7 +133,6 @@ static void equal_test() BOOST_CHECK(f.contains(contain_test::ReturnIntFE(17))); -#if !defined(BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX) boost::function g; g = &forty_two; @@ -149,7 +148,6 @@ static void equal_test() BOOST_CHECK(&forty_two != g); BOOST_CHECK(ReturnInt(17) == g); BOOST_CHECK(ReturnInt(16) != g); -#endif } static void ref_equal_test() @@ -180,7 +178,6 @@ static void ref_equal_test() BOOST_CHECK(!(ri2 != f)); } -#if !defined(BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX) { ReturnInt ri(17); boost::function f = boost::ref(ri); @@ -206,7 +203,6 @@ static void ref_equal_test() BOOST_CHECK(ri2 == f); BOOST_CHECK(!(ri2 != f)); } -#endif } int main()