"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 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 _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost