Boost logo

Boost :

From: Markus Schöpflin (markus.schoepflin_at_[hidden])
Date: 2003-02-06 06:59:49


Hubert Holin wrote:

> I am stumbling on another problem, though.
>
> Given
>
> boost::unit_test_framework::test_suite * test = BOOST_TEST_SUITE("");
>
> if I have the following normal function
>
> void fn(int)
> {
> }
>
> then I can do the following
>
> 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


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