Boost logo

Boost Users :

From: Dizzy (dizzy_at_[hidden])
Date: 2007-03-30 10:00:45


Hello

On Thursday 29 March 2007 18:22, Nat Goodspeed wrote:
> -----Original Message-----
> From: boost-users-bounces_at_[hidden]
> [mailto:boost-users-bounces_at_[hidden]] On Behalf Of Dizzy
> Sent: Thursday, March 29, 2007 11:05 AM
> To: boost-users_at_[hidden]
> Subject: Re: [Boost-users] [lambda] logical operators related errors
>
> > [Nat] I think the problem may be that you're mixing boost::bind with
> > plain operators. Try using boost::lambda::bind instead and see if you
> > get farther.
>
> Ok, using lambda::bind and lambda::_1, lambda::_2 it seems to work.
>
> Any idea why operator< works with the boost::bind functors and
> operator&&
> doesn't ? Or something else that I'm missing (such as there have been
> made
> special overloads for operator< to work with boost::bind functors).
>
> [Nat] IIRC, operator< has a special overload for boost::bind objects
> (for use as map keys?).

Indeed, I was misinformed initially. The boost bind documentation explains
this well (http://www.boost.org/libs/bind/bind.html#operators):

"For convenience, the function objects produced by bind overload the logical
not operator ! and the relational operators ==, !=, <, <=, >, >=."

Thanks for your help.

-- 
Mihai RUSU					Email: dizzy_at_[hidden]
GPG : http://dizzy.roedu.net/dizzy-gpg.txt	WWW: http://dizzy.roedu.net
			"Linux is obsolete" -- AST

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