help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Nested std::tr1::bind problem


From: Pedro Lamarão
Subject: Re: Nested std::tr1::bind problem
Date: Tue, 11 Mar 2008 11:41:13 -0700 (PDT)
User-agent: G2/1.0

On Mar 10, 9:06 am, Rodolfo Lima <rodo...@rodsoft.org> wrote:
> Hi, I'm playing a little bit with std::tr1::bind and found that the
> following code doesn't compile:
>
> bind(std::multiplies<int>(), _1, bind(std::minus<int>(), 6, _2))(1,2);
>
> but the following does:
>
> int one=1, two=2;
> bind(std::multiplies<int>(), _1, bind(std::minus<int>(), 6, _2))(one,two);

None of the candidate functions in the overload set, as given in the
error diagnostic, take rvalues as arguments.

I'm not familiar with tr1::bind to know if this is correct behaviour
or not.

--
 P.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]