// (C) Copyright John Maddock 2005. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifdef TEST_STD_HEADERS #include #else #include #endif #include #include #define NO_INHERT_TEST #include "verify_functor.hpp" struct expected_result { expected_result(){} }; struct test { expected_result field; expected_result nullary(); expected_result nullary_c()const; expected_result nullary_v()volatile; expected_result nullary_cv()const volatile; expected_result unary(int); expected_result unary_c(int)const; expected_result unary_v(int)volatile; expected_result unary_cv(int)const volatile; }; int main() { verify_field_functor(std::tr1::mem_fn(&test::field), std::unary_function()); verify_field_functor(std::tr1::mem_fn(&test::field), std::unary_function()); verify_unary_functor(std::tr1::mem_fn(&test::nullary), std::unary_function()); verify_unary_functor(std::tr1::mem_fn(&test::nullary_c), std::unary_function()); //verify_unary_functor(std::tr1::mem_fn(&test::nullary_v), std::unary_function()); //verify_unary_functor(std::tr1::mem_fn(&test::nullary_cv), std::unary_function()); verify_binary_functor(std::tr1::mem_fn(&test::unary), std::binary_function()); verify_binary_functor(std::tr1::mem_fn(&test::unary_c), std::binary_function()); //verify_binary_functor(std::tr1::mem_fn(&test::unary_v), std::binary_function()); //verify_binary_functor(std::tr1::mem_fn(&test::unary_cv), std::binary_function()); return 0; }