epilogue.hpp 960 B

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