1// Boost.Function library
2
3#ifndef BOOST_FUNCTION_EPILOGUE_HPP
4#define BOOST_FUNCTION_EPILOGUE_HPP
5
6// Copyright 2023 Peter Dimov
7// Distributed under the Boost Software License, Version 1.0.
8// https://www.boost.org/LICENSE_1_0.txt
9
10// Resolve C++20 issue with fn == bind(...)
11// https://github.com/boostorg/function/issues/45
12
13#if !defined(BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX)
14
15namespace boost
16{
17
18namespace _bi
19{
20
21template<class R, class F, class L> class bind_t;
22
23} // namespace _bi
24
25template<class S, class R, class F, class L> bool operator==( function<S> const& f, _bi::bind_t<R, F, L> const& b )
26{
27 return f.contains( b );
28}
29
30template<class S, class R, class F, class L> bool operator!=( function<S> const& f, _bi::bind_t<R, F, L> const& b )
31{
32 return !f.contains( b );
33}
34
35} // namespace boost
36
37#endif // #if !defined(BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX)
38
39#endif // #ifndef BOOST_FUNCTION_EPILOGUE_HPP
40