$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Ken Alverson (Ken_at_[hidden])
Date: 2003-07-10 16:29:05
"Marshall Clow" <marshall_at_[hidden]> wrote in message
news:p0600180dbb3263f73870@[129.46.153.123]...
>
> 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 operator()(const std::pair <T1, T2> & x) const { return x.first;}
> };
Wouldn't
const T1& operator()(const std::pair <T1, T2>& x) const {return x.first;}
be more appropriate? And would a matching
T1& operator()(std::pair <T1, T2>& x) const {return x.first;}
make sense?
Ken