mirror of
https://github.com/boostorg/function.git
synced 2025-07-31 21:34:27 +02:00
Reversed prior commit - tests passing references for the implicit
object parameter to an unbound member function pointer have been added again. [SVN r11732]
This commit is contained in:
@@ -598,9 +598,9 @@ 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 test_main(int, char* [])
|
int test_main(int, char* [])
|
||||||
|
@@ -598,9 +598,9 @@ 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 test_main(int, char* [])
|
int test_main(int, char* [])
|
||||||
|
Reference in New Issue
Block a user