1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#include <iostream> #include <boost/mpl/for_each.hpp> #include "quant_types.hpp" using namespace std; struct printer { template<typename T> void operator() (T x) { cout << T::name << ":\t" << (int) RuntimeID<T>::value << endl; } }; int main() { boost::mpl::for_each<QuantorList>(printer()); }