function_equal.hpp 791 B

12345678910111213141516171819202122232425262728
  1. // Copyright Douglas Gregor 2004.
  2. // Copyright 2005 Peter Dimov
  3. // Use, modification and distribution is subject to
  4. // the Boost Software License, Version 1.0.
  5. // (See accompanying file LICENSE_1_0.txt or copy at
  6. // http://www.boost.org/LICENSE_1_0.txt)
  7. // For more information, see http://www.boost.org
  8. #ifndef BOOST_FUNCTION_EQUAL_HPP
  9. #define BOOST_FUNCTION_EQUAL_HPP
  10. namespace boost {
  11. template<typename F, typename G>
  12. bool function_equal_impl(const F& f, const G& g, long)
  13. { return f == g; }
  14. // function_equal_impl needs to be unqualified to pick
  15. // user overloads on two-phase compilers
  16. template<typename F, typename G>
  17. bool function_equal(const F& f, const G& g)
  18. { return function_equal_impl(f, g, 0); }
  19. } // end namespace boost
  20. #endif // BOOST_FUNCTION_EQUAL_HPP