Boost logo

Boost :

From: rogeeff (rogeeff_at_[hidden])
Date: 2001-12-26 10:27:11


--- In boost_at_y..., "Peter Dimov" <pdimov_at_m...> wrote:
> From: "rogeeff" <rogeeff_at_m...>
> [...]
> > > unit_test_suite_ex_test.cpp:58: instantiated from here
> > > ../../../boost/bind.hpp:212: no match for
`boost::_bi::list1<int &>
> > &[const
> > > boost::_bi::arg<2> &]'
>
> [...]
>
> > Peter, could you help here. I am a bit confused with this errors.
> > Maybe &test2 should be substituted with ptr_fun( &test2 )?
>
> This error means that you used _2 (it's of type boost::_bi::arg<2>)
to
> select the second argument, but the argument list contains a single
argument
> of type 'int' (boost::_bi::list1<int&>).
>
> One common mistake of this kind is to type bind(f, a, _2) instead
of bind(f,
> a, _1).
>
> HTH
>
> --
> Peter Dimov
> Multi Media Ltd.

test2 defined like this:

void test2( int arg, int mask );

Seems that I misused _1, _2:

Should if be bind( &test2, *it, _2 ) instead of bind( &test2, _2,
*it ) ?

Gennadiy.

P.S. In docs you provide an example that include: . bind(f, _1, 5)(x)
is equivalent to f(x, 5);


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