9 Jul
2010
9 Jul
'10
4:09 p.m.
Say I have a vector of vectors and I want to sort each "child" vector. How would I accomplish this using range::for_each and range::sort?
10 Jul
10 Jul
3:06 p.m.
AMDG Kenny Riddile wrote:
Say I have a vector of vectors and I want to sort each "child" vector. How would I accomplish this using range::for_each and range::sort?
#include <vector> #include <boost/range/algorithm/for_each.hpp> #include <boost/spirit/home/phoenix/stl/algorithm/transformation.hpp> #include <boost/spirit/home/phoenix/core.hpp> int main() { std::vector<std::vector<int> > vec; boost::range::for_each(vec, boost::phoenix::sort(boost::phoenix::arg_names::_1)); } In Christ, Steven Watanabe
5186
Age (days ago)
5187
Last active (days ago)
1 comments
2 participants
participants (2)
-
Kenny Riddile
-
Steven Watanabe