On Wed, Sep 24, 2003 at 01:55:09PM +0000, Angus Leeming wrote: > Given an enum, is there a semi-automated way of returning a vector of all > named enum values? The best I can come up with is this:
None that I am aware of. Actually, your solution does not work for e.g. enum TransformID { Rotate, Resize, Clip = 7, Extra }; Your program just lists all numbers from 0 to 8, doesn't it? [My personal opinion is that enums are still second class citizens in C++ much like C-style arrays..] Andre' -- Those who desire to give up Freedom in order to gain Security, will not have, nor do they deserve, either one. (T. Jefferson or B. Franklin or both...)