The following appears to work (it compiles :)):
#include
on Mon Aug 13 2007, "Graham Reitz"
wrote: typedef boost::tuples::tuple
some_tuple; std::vector
vec_of_some_tuples; // ... stuff some data into the vector
// ... search for a specific int in the vector of some_tuple
What would be a good method, using an stl algorithm, to search through the vector above to match only the int portion of the tuple (ignoring the double)?
Use std::find with a boost::transform_iterator over a function returning the first member of the tuple, then extract the resulting iterator's base() iterator.
HTH,
-- Dave Abrahams Boost Consulting http://www.boost-consulting.com
The Astoria Seminar ==> http://www.astoriaseminar.com
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users