
5 Aug
2013
5 Aug
'13
11:37 p.m.
On 8/5/2013 10:49 AM, Tim Burgess wrote:
Hi,
Is it possible to use boost_foreach to iterate over the members of a c++ enum? If so, can anybody point me to an example?
No. BOOST_FOREACH is for ranges, and an enum is not a range. There is no way to do what you're asking because C++ doesn't have the reflection capabilities needed to iterate through all members of an enum. -- Eric Niebler Boost.org http://www.boost.org