At 06:15 PM 7/12/2003, Aleksey Gurtovoy wrote:
Brian McNamara wrote:
If and when I get FC++ ( http://www.cc.gatech.edu/~yannis/fc++/ ) into
Boost, FC++ has the same kind of selectors you've shown above (named
fst and snd, as in Haskell). Whereas these function objects also
cannot be used
At 22:51 2003-07-10, Marshall Clow wrote:
At 7:21 AM -0400 7/10/03, David Abrahams wrote:
Marshall Clow [EMAIL PROTECTED] writes:
So, here they are. Are they useful to anyone else? Is there some
reason that
they don't already exist? Did I miss them somewhere?
template class T1, class T2
On Sat, Jul 12, 2003 at 01:21:49PM +0100, Andy Sawyer wrote:
There's a third form I've also found useful on occasion:
struct selector1st
{
templatetypename Pair
const typename Pair::first_type operator()( const Pair a ) const
{
return a.first;
}
};
Which has the advantage
Edward Diener writes:
Andy Sawyer wrote:
Marshall's first and second are slightly different to the HP
versions:
template class T1, class T2
struct first: std::unary_function std::pair T1, T2, T1
...
vs.
templatetypename Pair
struct select1st
:
Andy Sawyer wrote:
From: Andy Sawyer [EMAIL PROTECTED]
To: Boost mailing list [EMAIL PROTECTED]
Subject: [boost] Re: functors for taking apart std::pair?
Date: Thu, 10 Jul 2003 22:10:42 +0100
ED == Edward Diener [EMAIL PROTECTED] writes:
Marshall Clow wrote:
I recently had a need
Marshall Clow [EMAIL PROTECTED] writes:
I recently had a need for a functor to return a component of a
std::pair, and I was
surprised to see that they didn't exist either in the standard library
or in boost.
So, here they are. Are they useful to anyone else? Is there some reason that
they
Marshall Clow wrote:
I recently had a need for a functor to return a component of a
std::pair, and I was
surprised to see that they didn't exist either in the standard
library or in boost.
Matt Austern lists in his excellent book Generic Programming and the STL
the functors select1st and
At 7:21 AM -0400 7/10/03, David Abrahams wrote:
Marshall Clow [EMAIL PROTECTED] writes:
So, here they are. Are they useful to anyone else? Is there some
reason that
they don't already exist? Did I miss them somewhere?
template class T1, class T2
struct first: std::unary_function std::pair
Marshall Clow [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
So, here they are. Are they useful to anyone else? Is there some reason that
they don't already exist? Did I miss them somewhere?
template class T1, class T2
struct first: std::unary_function std::pair T1, T2, T1
{
T1
From: Andy Sawyer [EMAIL PROTECTED]
To: Boost mailing list [EMAIL PROTECTED]
Subject: [boost] Re: functors for taking apart std::pair?
Date: Thu, 10 Jul 2003 22:10:42 +0100
ED == Edward Diener [EMAIL PROTECTED] writes:
ED Marshall Clow wrote:
I recently had a need for a functor to return
10 matches
Mail list logo