forked from boostorg/function
Conditionally disable tests using deprecated/removed C++98 binders.
Signed-off-by: Daniela Engert <dani@ngrt.de>
This commit is contained in:
@ -20,11 +20,12 @@ int X::foo(int x) { return -x; }
|
|||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
|
#ifndef BOOST_NO_CXX98_BINDERS
|
||||||
boost::function<int (int)> f;
|
boost::function<int (int)> f;
|
||||||
X x;
|
X x;
|
||||||
f = std::bind1st(
|
f = std::bind1st(
|
||||||
std::mem_fun(&X::foo), &x);
|
std::mem_fun(&X::foo), &x);
|
||||||
f(5); // Call x.foo(5)
|
f(5); // Call x.foo(5)
|
||||||
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -20,11 +20,12 @@ int X::foo(int x) { return -x; }
|
|||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
|
#ifndef BOOST_NO_CXX98_BINDERS
|
||||||
boost::function1<int, int> f;
|
boost::function1<int, int> f;
|
||||||
X x;
|
X x;
|
||||||
f = std::bind1st(
|
f = std::bind1st(
|
||||||
std::mem_fun(&X::foo), &x);
|
std::mem_fun(&X::foo), &x);
|
||||||
f(5); // Call x.foo(5)
|
f(5); // Call x.foo(5)
|
||||||
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user