|
Boost : |
From: Fernando Cacciola (fernando_cacciola_at_[hidden])
Date: 2006-11-03 13:03:24
Hi Peter,
> Fernando Cacciola wrote:
>
>> template<class Functors, int N>
>> struct get_bind_expr_type
>> {
>> typedef typename ::boost::tuples::element<N,Functors>::type Functor
>> ;
>>
>> typedef typename Functor::result_type functor_result_type ;
>>
>> // This should be the result type of the previous functor in real
>> code typedef typename Functor::result_type functor_argument_type ;
>>
>> // NOTE: the recursion is inside this metafucntion
>> typedef typename get_bind_argument_type<Functors,N>::type
>> bind_argument_type ;
>>
>> typedef _bi::bind_t<functor_result_type
>> ,functor_result_type (*) ( functor_argument_type
>> )
>
> You probably need Functor here, not some pointer to function.
Oops, of course.
But even fixing that I still get the same error:
Error 1 error C2664: 'boost::_bi::bind_t<R,F,L>::bind_t(const
boost::_bi::bind_t<R,F,L> &)' : cannot convert parameter 1 from
'boost::_bi::bind_t<R,F,L>' to 'const boost::_bi::bind_t<R,F,L> &'
d:\programacion\projects\policypipe\policypipe\policypipe.cpp 120
Here:
static result_type apply( Functors const& functors )
{
========> return bind(functors.get<N>(),
functor_pipe_impl<Functors,N-1>::apply(functors) );
}
The compiler, VC8.0, is refusing to copy construct the bind_t object.
Any idea why?
FWIW I tried the same with LL::bind and I get the same kind of error
(can't copy construct functor_base<...>)
TIA
Fernando Cacciola
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk