
AMDG Joseph Winston wrote:
In http://lists.boost.org/Archives/boost/2003/11/56289.php, there was a question on how one should locate all the mpl::pair's that match a given type when one was only interested in the first item in the pair. The suggested solution looked like something like this:
#include
#include #include #include int main(int, char **) { using namespace boost;
typedef mpl::vector< mpl::pair
, mpl::pair , mpl::pair , mpl::pair > pairs; typedef mpl::find< mpl::transform_view< pairs, mpl::select1st<> >, long >::type::base iter; }
However, mpl::select1st<> no longer is a part of boost and I don't see how to accomplish this despite having "C++ Template Metaprogramming" in my hands. I'd like to know what is the correct way in a recent version of boost, to accomplish this.
mpl::firstmpl::_1 In Christ, Steven Watanabe