mirror of
https://github.com/boostorg/function.git
synced 2025-07-04 16:26:31 +02:00
function_n_test.cpp:
function_test.cpp: - Removed use of (previously existing) ability to use references for the first parameter to an unbound pointer-to-member function. Only pointer-like entities are allowed. [SVN r11728]
This commit is contained in:
@ -598,13 +598,12 @@ test_member_functions()
|
|||||||
BOOST_TEST(f1_2(&one) == 2);
|
BOOST_TEST(f1_2(&one) == 2);
|
||||||
BOOST_TEST(f1_2(&five) == 10);
|
BOOST_TEST(f1_2(&five) == 10);
|
||||||
|
|
||||||
boost::function2<int, X&, int> f2(&X::plus);
|
boost::function2<int, X*, int> f2(&X::plus);
|
||||||
BOOST_TEST(f2(one, 3) == 4);
|
BOOST_TEST(f2(&one, 3) == 4);
|
||||||
BOOST_TEST(f2(five, 4) == 9);
|
BOOST_TEST(f2(&five, 4) == 9);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int test_main(int, char* [])
|
||||||
test_main(int, char* [])
|
|
||||||
{
|
{
|
||||||
test_zero_args();
|
test_zero_args();
|
||||||
test_one_arg();
|
test_one_arg();
|
||||||
|
@ -598,13 +598,12 @@ test_member_functions()
|
|||||||
BOOST_TEST(f1_2(&one) == 2);
|
BOOST_TEST(f1_2(&one) == 2);
|
||||||
BOOST_TEST(f1_2(&five) == 10);
|
BOOST_TEST(f1_2(&five) == 10);
|
||||||
|
|
||||||
boost::function<int, X&, int> f2(&X::plus);
|
boost::function<int, X*, int> f2(&X::plus);
|
||||||
BOOST_TEST(f2(one, 3) == 4);
|
BOOST_TEST(f2(&one, 3) == 4);
|
||||||
BOOST_TEST(f2(five, 4) == 9);
|
BOOST_TEST(f2(&five, 4) == 9);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int test_main(int, char* [])
|
||||||
test_main(int, char* [])
|
|
||||||
{
|
{
|
||||||
test_zero_args();
|
test_zero_args();
|
||||||
test_one_arg();
|
test_one_arg();
|
||||||
|
Reference in New Issue
Block a user