Listing 5: Final FOR_EACH.
#define ENUM_T(coll) \ enumerator<sizeof(select(coll))> #define FOR_EACH( type, var, coll ) \ if( ENUM_T(coll)::enum_type _num_ = 0 ) {} \ else if( ENUM_T(coll)::init_enum(_num_, coll) ) {} \ else for( type var; ENUM_T(coll)::move_next(var,_num_,coll); )