bind_t now implements function_equal instead of operator==

[SVN r27630]
This commit is contained in:
Peter Dimov
2005-03-13 17:25:42 +00:00
parent 28cb8f8206
commit b1f05e7268
2 changed files with 61 additions and 9 deletions
+19 -5
View File
@@ -10,7 +10,7 @@
//
// bind_eq_test.cpp - boost::bind equality operator
//
// Copyright (c) 2004 Peter Dimov
// Copyright (c) 2004, 2005 Peter Dimov
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
@@ -20,6 +20,10 @@
#include <boost/bind.hpp>
#include <boost/ref.hpp>
#ifdef BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
# include <boost/function_equal.hpp>
#endif
#if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
#pragma warning(push, 3)
#endif
@@ -142,14 +146,24 @@ void fv_9(X, X, X, X, X, X, X, X, X)
template<class F> void test_eq(F f1, F f2)
{
BOOST_TEST(f1 == f2);
BOOST_TEST(!(f1 != f2));
#ifdef BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
using boost::function_equal;
#endif
BOOST_TEST( function_equal( f1, f2 ) );
}
template<class F> void test_ne(F f1, F f2)
{
BOOST_TEST(f1 != f2);
BOOST_TEST(!(f1 == f2));
#ifdef BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
using boost::function_equal;
#endif
BOOST_TEST( !function_equal( f1, f2 ) );
}
// 0