Boost logo

Boost :

From: John Torjo (john.lists_at_[hidden])
Date: 2003-11-20 01:56:10


Hi all,

How is boost::mpl::select1st<> supposed to be used?
I want something in the lines of selecting the first item from a pair.

Something like:
std::map< std::string, int> c;
std::vector<std::string> v;

// copy all the keys into v
std::copy( c.begin(), c.end(),
  boost::bind<std::string>( select1st(), std::back_inserter(v));

Can select1st be used, or is there some other utility function? Thanks.

Best,
John


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk