How to Retrieve the Firsts from a Collection of Pairs
▻https://www.fluentcpp.com/2018/11/09/retrieve-firsts-collection-pairs
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 […]