Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 1 | // Copyright Douglas Gregor 2004. |
| 2 | // Copyright 2005 Peter Dimov |
| 3 | |
| 4 | // Use, modification and distribution is subject to |
| 5 | // the Boost Software License, Version 1.0. |
| 6 | // (See accompanying file LICENSE_1_0.txt or copy at |
| 7 | // http://www.boost.org/LICENSE_1_0.txt) |
| 8 | |
| 9 | // For more information, see http://www.boost.org |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 10 | #ifndef NDNBOOST_FUNCTION_EQUAL_HPP |
| 11 | #define NDNBOOST_FUNCTION_EQUAL_HPP |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 12 | |
| 13 | namespace ndnboost { |
| 14 | |
| 15 | template<typename F, typename G> |
| 16 | bool function_equal_impl(const F& f, const G& g, long) |
| 17 | { return f == g; } |
| 18 | |
| 19 | // function_equal_impl needs to be unqualified to pick |
| 20 | // user overloads on two-phase compilers |
| 21 | |
| 22 | template<typename F, typename G> |
| 23 | bool function_equal(const F& f, const G& g) |
| 24 | { return function_equal_impl(f, g, 0); } |
| 25 | |
| 26 | } // end namespace ndnboost |
| 27 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 28 | #endif // NDNBOOST_FUNCTION_EQUAL_HPP |