forked from boostorg/function
Resolve C++20 issue with fn == bind(...). Fixes #45.
This commit is contained in:
@ -71,4 +71,6 @@
|
|||||||
# undef BOOST_PP_ITERATION_PARAMS_1
|
# undef BOOST_PP_ITERATION_PARAMS_1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <boost/function/detail/epilogue.hpp>
|
||||||
|
|
||||||
#endif // !defined(BOOST_FUNCTION_MAX_ARGS_DEFINED) || (BOOST_FUNCTION_MAX_ARGS_DEFINED != BOOST_FUNCTION_MAX_ARGS)
|
#endif // !defined(BOOST_FUNCTION_MAX_ARGS_DEFINED) || (BOOST_FUNCTION_MAX_ARGS_DEFINED != BOOST_FUNCTION_MAX_ARGS)
|
||||||
|
39
include/boost/function/detail/epilogue.hpp
Normal file
39
include/boost/function/detail/epilogue.hpp
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
// Boost.Function library
|
||||||
|
|
||||||
|
#ifndef BOOST_FUNCTION_EPILOGUE_HPP
|
||||||
|
#define BOOST_FUNCTION_EPILOGUE_HPP
|
||||||
|
|
||||||
|
// Copyright 2023 Peter Dimov
|
||||||
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
|
// Resolve C++20 issue with fn == bind(...)
|
||||||
|
// https://github.com/boostorg/function/issues/45
|
||||||
|
|
||||||
|
#if !defined(BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX)
|
||||||
|
|
||||||
|
namespace boost
|
||||||
|
{
|
||||||
|
|
||||||
|
namespace _bi
|
||||||
|
{
|
||||||
|
|
||||||
|
template<class R, class F, class L> class bind_t;
|
||||||
|
|
||||||
|
} // namespace _bi
|
||||||
|
|
||||||
|
template<class S, class R, class F, class L> bool operator==( function<S> const& f, _bi::bind_t<R, F, L> const& b )
|
||||||
|
{
|
||||||
|
return f.contains( b );
|
||||||
|
}
|
||||||
|
|
||||||
|
template<class S, class R, class F, class L> bool operator!=( function<S> const& f, _bi::bind_t<R, F, L> const& b )
|
||||||
|
{
|
||||||
|
return !f.contains( b );
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
#endif // #if !defined(BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX)
|
||||||
|
|
||||||
|
#endif // #ifndef BOOST_FUNCTION_EPILOGUE_HPP
|
Reference in New Issue
Block a user