Simple.
How to Retrieve the Firsts from a Collection of Pairs
by Jonathan Boccara
From the article:
When using the STL, there is a use case that pops up every now and then and that often causes more trouble than necessary: if we have a collection of pairs, like an std::vector of pairs, or simply a std::map, how can we retrieve the collection of the first elements of each item in the collection?
Add a Comment
Comments are closed.