|
Boost : |
From: Malte Starostik (malte_at_[hidden])
Date: 2002-10-02 21:51:12
Hi,
I often face situations where I need to apply an algorithm to the keys or
values of elements in a map or multimap. SGI's STL implementation provides
the extensions select1st and select2nd for this, GNU's implementation
provides them in namespace __gnu_cxx.
I looked hard for something like this in the Boost libraries, but didn't find
anything. As it's only two small utilities I don't think it would justify an
own library, but I'm not sure which one would be best to add it to (provided
that I'm not alone in thinking this would be a useful addition to boost :-})
select1st and select2nd are function objects of which the operator() takes a
std::pair and returns its first or second value resp.
Would it have a chance if I submitted an implementation?
Regards,
-Malte
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk