Boost logo

Boost :

From: David Abrahams (abrahams_at_[hidden])
Date: 2000-06-08 18:55:45


Sorry, but I have no idea what you're talking about. It appears we've lost
each other here...

-Dave
----- Original Message -----
From: "Gary Powell" <Gary.Powell_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Thursday, June 08, 2000 6:06 PM
Subject: RE: [boost] Re: lexicographic_less

> > In my
> > particular case I'm trying to make a sort key out of a 'C' struct
> > which was defined externally,
> >
> > Lastly, I've been thinking that the ideal facility would allow the
> > user to choose the comparison operator/functor for each element being
> > compared (i.e. you might use std::less on the first element but
> > std::greater on the 2nd).
> >
> So the part I don't get is, why not write the global
> operator>(Cstruct,Cstruct), or a plain old functor? I don't see how your
> infinitely adjustable set of classes makes the code any easier to read or
> maintain. (Or it could be I need another cup of coffee...)
>
> // TURN DAY DREAM ON.
> IF C++ had a templated typedef, you could write it as a lambda statement.
>
> template<class T>
> typedef lambda_statement<T> CompareOperation;
>
> struct C;
>
> typedef containerType(C *, CompareOperation);
>
> containerType container(CompareOperation(free1->*(&C::member1) >
> free2->*(&C::member1)
> && ....
> ) );
>
> But without that typedef, (and some other hand waving) writing the lambda
> typedef operation would be grounds for cruel and unusual punishment.
>
> // TURN DAY DREAM OFF.
>
> -gary-
>
> ------------------------------------------------------------------------
> Take your development to new heights. Work with clients like Dell and
> pcOrder. Submit your resume to jobs_at_liaison.com. Visit us at
> http://click.egroups.com/1/4358/3/_/9351/_/960502150/
> ------------------------------------------------------------------------
>
>


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