forked from boostorg/function
Remove BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX workarounds
This commit is contained in:
@ -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<class S, class R, class F, class L> bool operator!=( function<S> const&
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // #if !defined(BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX)
|
||||
|
||||
#endif // #ifndef BOOST_FUNCTION_EPILOGUE_HPP
|
||||
|
@ -10,15 +10,9 @@
|
||||
#define BOOST_FUNCTION_FWD_HPP
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#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<typename Signature> class function;
|
||||
|
||||
@ -27,7 +21,6 @@ namespace boost {
|
||||
{
|
||||
f1.swap(f2);
|
||||
}
|
||||
#endif // have partial specialization
|
||||
|
||||
// Portable syntax
|
||||
template<typename R, typename... T> class function_n;
|
||||
|
@ -1020,13 +1020,7 @@ template<typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS>
|
||||
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<typename R BOOST_FUNCTION_COMMA
|
||||
BOOST_FUNCTION_TEMPLATE_PARMS>
|
||||
@ -1119,7 +1113,6 @@ public:
|
||||
};
|
||||
|
||||
#undef BOOST_FUNCTION_PARTIAL_SPEC
|
||||
#endif // have partial specialization
|
||||
|
||||
} // end namespace boost
|
||||
|
||||
|
@ -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<int(void)> 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<int(void)> f = boost::ref(ri);
|
||||
@ -206,7 +203,6 @@ static void ref_equal_test()
|
||||
BOOST_CHECK(ri2 == f);
|
||||
BOOST_CHECK(!(ri2 != f));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
int main()
|
||||
|
Reference in New Issue
Block a user