2
0
mirror of https://github.com/boostorg/bind.git synced 2026-01-22 17:12:09 +00:00

More regression fixes

[SVN r11762]
This commit is contained in:
Peter Dimov
2001-11-21 12:34:23 +00:00
parent 463f513c23
commit 5134310a5e
3 changed files with 389 additions and 396 deletions

View File

@@ -174,7 +174,7 @@ struct Y
short operator()(short & r) const { return ++r; }
int operator()(int a, int b) const { return a + 10 * b; }
long operator() (long a, long b, long c) const { return a + 10 * b + 100 * c; }
void operator() (long a, long b, long c, const char*) const { global_result = a + 10 * b + 100 * c; }
void operator() (long a, long b, long c, long d) const { global_result = a + 10 * b + 100 * c + 1000 * d; }
};
void function_object_test()
@@ -189,9 +189,9 @@ void function_object_test()
BOOST_TEST( bind<short>(Y(), ref(i))() == 8 );
BOOST_TEST( bind<int>(Y(), i, _1)(k) == 38 );
BOOST_TEST( bind<long>(Y(), i, _1, 9)(k) == 938 );
#if !defined(__MWERKS__) || __MWERKS__ > 0x2406 // Fails for this version of the compiler.
BOOST_TEST( (bind<void>(Y(), i, _1, 9, "nothing")(k), (global_result == 938)) );
#endif
bind<void>(Y(), i, _1, 9, 4)(k);
BOOST_TEST( global_result == 4938 );
}
//