Boost logo

Boost Users :

From: Nat Goodspeed (ngoodspeed_at_[hidden])
Date: 2006-02-22 19:39:12


From: boost-users-bounces_at_[hidden] [mailto:boost-users-bounces_at_[hidden]] On Behalf Of Antonio Piccolboni
Sent: Wednesday, February 22, 2006 7:15 PM
To: boost-users_at_[hidden]
Subject: Re: [Boost-users] [bind] Generic loop with generic algorithmchickenand egg signature problem

Thanks Peter, but it does not. Error message

bind_test.cpp: In function 'int main()':
bind_test.cpp:33: error: no matching function for call to 'bind(<unknown type>, const boost::lambda::lambda_functor<boost::lambda::placeholder<1> >&, const boost::lambda::lambda_functor<boost::lambda::placeholder<2> >&, int)'

This also dooms my theory of why this doesn't work since the explicit instantiation of the  accumulate template should provide the necessary information.

On 2/22/06, Peter Dimov <pdimov_at_[hidden]> wrote:
Antonio Piccolboni wrote:

[...]

> int main() {
>   std::vector<int> d;
>   std::vector<std::vector<int> > s;
>   loop_func(s.begin(), s.end (), d.begin(),
>         BinFunc()); //flies with gcc
>   loop_func(s.begin(), s.end(), d.begin(),
>           bind<int>(std::accumulate, _1, _2, 0.0)); //does not

    bind( std::accumulate< std::vector<int>::iterator, int >, _1, _2, 0 )

[Nat] Umm, parentheses() after the std::accumulate template params?


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net