
11 Apr
2012
11 Apr
'12
10:33 p.m.
Is there a method in the boost library to iterate a vector of boost::tuple objects, comparing the 1st element in the tuple of each tuple to a value that I specify? My tuple is setup like so: typedef boost::tuple<int, int, char const*> Tuple; typedef std::vector<Tuple> ErrorStringMap; ErrorStringMap mystrings = tuple_list_of (10, "10", "ten") (20, "20", "twenty") (30, "30", "thirty") (10, "10", "ten"); I want to search the vector of tuples and do something with every tuple that has the number 10 as the first element in the tuple.