Re: [Users] Problems with parameterized boost::function based test case

add( BOOST_PARAM_TEST_CASE( bind( &test_mask, _1, 0x80 ), parameters_list.begin(), parameters_list.end() ) ) );
I get the following error:
error C2661: 'boost::unit_test_framework::create_test_case' : no
overloaded
function takes 4 arguments
It all caused by the fact that following fails: void moo( int , int ) { } template<typename T> void foo( boost::function1<void,T> const& f ) { } ... foo( bind( &moo, _1, 1 ) ); Is there way to make it work? Gennadiy.

Maybe new subject better explain what I looking for. Any suggestions? Gennadiy.
add( BOOST_PARAM_TEST_CASE( bind( &test_mask, _1, 0x80 ), parameters_list.begin(), parameters_list.end() ) ) );
I get the following error:
error C2661: 'boost::unit_test_framework::create_test_case' : no
overloaded
function takes 4 arguments
It all caused by the fact that following fails:
void moo( int , int ) { }
template<typename T> void foo( boost::function1<void,T> const& f ) {
}
...
foo( bind( &moo, _1, 1 ) );
Is there way to make it work?
Gennadiy.

Gennadiy Rozental wrote:
Maybe new subject better explain what I looking for.
Any suggestions?
Gennadiy.
add( BOOST_PARAM_TEST_CASE( bind( &test_mask, _1, 0x80 ), parameters_list.begin(), parameters_list.end() ) ) );
I get the following error:
error C2661: 'boost::unit_test_framework::create_test_case' : no overloaded function takes 4 arguments
It all caused by the fact that following fails:
void moo( int , int ) { }
template<typename T> void foo( boost::function1<void,T> const& f ) {
}
...
foo( bind( &moo, _1, 1 ) );
This is not bind-specific. Try, for example: void test(int) { } int main() { foo( test ); } T in function1<void, T> can only be deduced from function1<void, U>. No other function object will work.
participants (2)
-
Gennadiy Rozental
-
Peter Dimov