Return type can now be omitted on adaptable function objects

[SVN r11401]
This commit is contained in:
Peter Dimov
2001-10-18 15:05:57 +00:00
parent b9bb33048f
commit c61d480cb6
3 changed files with 230 additions and 54 deletions

View File

@@ -120,6 +120,23 @@ void function_object_test()
//
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
struct Z
{
typedef int result_type;
int operator()(int a, int b) const { return a + 10 * b; }
};
void adaptable_function_object_test()
{
BOOST_TEST( boost::bind(Z(), 7, 4)() == 47 );
}
#endif
//
struct X
{
mutable unsigned int hash;
@@ -262,6 +279,9 @@ int test_main(int, char * [])
{
function_test();
function_object_test();
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
adaptable_function_object_test();
#endif
member_function_test();
nested_bind_test();