I am trying to create my own predicate for BOOST_CHECK_PREDICATE where the predicate itself is a templated function. My example is as follows:
3> .. \ boost_test \ testSystem.cpp (42): error C2780: 'bool boost :: test_tools :: tt_detail :: check_frwd (Pred, link boost :: unit_test :: lazy_ostream & amp ;, boost :: test_tools :: const_string, size_t, forces :: test_tools :: tt_detail :: tool_level, raise :: test_tools :: tt_detail :: check_type, const Arg0 and, const char *, const Arg1 &, const char *, const Arg2 &, const char *, const Arg3 &, const char *, const Arg4 &, const char *) ': expects 16 arguments - 10 under condition 3>
C: \ Boost \ include \ boost-1_51 \ boost / test / test_tools.hpp (523): see the declaration 'boost :: test_tools :: tt_detail :: check_frwd' 3> .. \ boost_test \ testSystem.cpp (42) : error C2780: 'bool raise :: test_tools :: tt_detail :: check_frwd (Pred, raise raise :: unit_test :: lazy_ostream & amp ;, raise :: test_tools :: const_string, size_t, force :: test_tools :: tt_detail :: tool_level, raise :: test_tools :: tt_detail :: check_type, const Arg0 and, const char *, const Arg1 &, const char *, const Arg2 &, const char *, const Arg3 & const char *) ': expects 14 arguments - 10 provided 3> C: \ Boost \ include \ boost-1_51 \ boost / test / test_tools.hpp (523): see the declaration 'boost :: test_tools :: tt_detail :: check_frwd' 3> .. \ boost_test \ testSystem .cpp (42): error C2780: 'bool raise :: test_tools :: tt_detail :: check_frwd (Pred, link raise :: unit_test :: lazy_os tream & amp ;, raising :: test_tools :: const_string, size_t, forces :: test_tools :: tt_detail :: tool_level, raise :: test_tools :: tt_detail :: check_type, const Arg0 and, const char *, const Arg1 &, const char *, const Arg2 &, const char *) ': expects 12 arguments - 10 provided 3> C: \ Boost \ include \ boost-1_51 \ boost / test / test_tools.hpp (523): see the declaration of' boost: : test_tools :: tt_detail :: check_frwd '3> .. \ boost_test \ testSystem.cpp (42): error C2896:' bool increase :: test_tools :: tt_detail :: check_frwd (Pred, link increase :: unit_test :: lazy_ostream & Amp ;, raise :: test_tools :: const_string, size_t, force :: test_tools :: tt_detail :: tool_level, raise :: test_tools :: tt_detail :: check_type, const Arg0 & const char *, const Arg1 &, const char *) ': cannot use template function' bool is_close_enough (c onst U &, const V &) 'as a function argument 3> .. \ boost_test \ testSystem.cpp (18): see the declaration' is_close_enough '3> .. \ boost_test \ testSystem.cpp (42): error C2784:' bool boost :: test_tools :: tt_detail :: check_frwd (Pred, const increase :: unit_test :: lazy_ostream & amp ;, increase :: test_tools :: const_string, size_t, force :: test_tools :: tt_detail :: tool_level, raise :: test_tools :: tt_detail :: check_type, link Arg0 & const char *, const Arg1 &, const char *) ': failed to deduce the template argument for the "overloaded function type" from the "overloaded" function type' 3>
C: \ Boost \ include \ boost-1_51 \ boost / test / test_tools.hpp (523): see the declaration 'boost :: test_tools :: tt_detail :: check_frwd' 3> .. \ boost_test \ testSystem.cpp (42) : error C2780: 'bool raise :: test_tools :: tt_detail :: check_frwd (Pred, raise raise :: unit_test :: lazy_ostream & amp ;, raise :: test_tools :: const_string, size_t, force :: test_tools :: tt_detail :: tool_level, raise :: test_tools :: tt_detail :: check_type, link Arg0 & const char *) ': expects 8 arguments - 10 provided