#include <iostream> #include <vector> #include <boost/foreach.hpp> #include <pstade/oven.hpp> using namespace std; using namespace pstade::oven; #define foreach BOOST_FOREACH int main() { vector<int> v; v.push_back(3); v.push_back(1); v.push_back(4); foreach (int item, v|reversed) { // 逆順にする cout << item << endl; } // 4, 1, 3 return 0; }