Boost logo

Boost :

From: Gennadiy Rozental (gennadiy.rozental_at_[hidden])
Date: 2003-02-06 12:42:07


> > test->add(BOOST_TEST_CASE(::boost::bind(&fn, 1)));
>
> I just tried this and MSVC7 tells me:
>
> test_charset.cpp(50) : error C2664:
> 'boost::unit_test_framework::test_case
> *boost::unit_test_framework::create_test_case(void (__cdecl
> *)(void),std::string)' : cannot convert parameter 1 from
> 'boost::_bi::bind_t<R,F,L>' to 'void (__cdecl *)(void)'
> with
> [
> R=void,
> F=void (__cdecl *)(int),
> L=boost::_bi::list_av_1<int>::type
> ]
> No user-defined-conversion operator available that can
> perform this conversion, or the operator cannot be called
>
> Is this a problem with me, my compiler, or something else?
>
> Markus

Did you include unit_test_suite_ex.hpp? If yes, try to separate &fn:
function0<void> tc = &fn

Gennadiy.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk