|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-08-16 08:52:51
From: "Gennadiy Rozental" <gennadiy_at_[hidden]>
> Here an output from compilation with gcc 3.1.1. Could somebody clarify
for
> me these messages:
>
> ...found 273 targets...
> ...updating 4 targets...
> gcc-C++-action
>
..\..\..\libs\test\test\bin\unit_test_suite_ex_test.test\gcc\debug\runtime-l
> ink-dynamic\unit_test_suite_ex_test.obj
> ...../boost/boost/bind.hpp: In instantiation of
> `boost::_bi::result_traits<boost::_bi::unspecified, void (*)(int, int)>':
> ...../boost/boost/bind/bind_template.hpp:16: instantiated from
> `boost::_bi::bind_t<boost::_bi::unspecified, void (*)(int, int),
> boost::_bi::list4<boost::arg<1>, boost::_bi::value<int>, boost::arg<2>,
> boost::_bi::value<int> > >'
> unit_test_suite_ex_test.cpp:80: instantiated from here
[...]
It would help if you include the source code, which in this case is:
function0<void> fct2 = bind( &test2, _1, 12345, _2, 0xcdf );
and 'test2' is
void test2( int arg, int mask )
There are two errors here. First, you are trying to pass four arguments to
test2: _1, 12345, _2, 0xcdf. Second, the _1 and _2 mean that the result
would be a binary function object, but you are assigning it to
function0<void>.
You probably want
function0<void> fct2 = bind( &test2, 12345, 0xcdf );
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk