[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lyx-devel
Subject:    Re: C++ question
From:       Andre Poenitz <poenitz () htwm ! de>
Date:       2003-09-24 13:16:25
[Download RAW message or body]

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...)
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic