Boost logo

Boost Users :

Subject: [Boost-users] [Range][Iterator] iterate over an enumeration?
From: John M. Dlugosz (mpbecey7gu_at_[hidden])
Date: 2013-01-29 14:33:01


I'd like to make it easy to do a BOOST_FOREACH for every value in an enumeration. I tried
     enum E { E_First, ⋯ , E_Last };
     boost::counting_range(E_First, E_Last)
but got compiler template barf.

Can someone suggest a good way to do this?


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net