|
Boost Users : |
Subject: Re: [Boost-users] Iterating over the seconds of a list of pairs
From: Robert Jones (robertgbjones_at_[hidden])
Date: 2009-08-08 17:21:14
2009/8/8 Björn Karlsson <Bjorn.Karlsson_at_[hidden]>
>
> template <typename U> T operator()(const std::pair<U,T>& element) const
> {
> return element.second;
> }
> };
>
To enable writing to the element.second, shouldn't that 'second' extractor
return a reference?
- Rob.
-- ACCU - Professionalism in programming - http://www.accu.org
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