forked from boostorg/function
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:
1 parent
11c56da46f
commit
d37d210685
2 files changed
+8
-10
No files matched your search
@@ -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