Enum in C++ like Enum in Ada?

前端 未结 8 966
没有蜡笔的小新
没有蜡笔的小新 2020-12-05 17:00

At one point I had looked at implementing a class/template in C++ that would support an Enum that would behave like it does in Ada. It has been some time since I thought abo

8条回答
  •  星月不相逢
    2020-12-05 17:57

    One of my colleagues has implemented a tool to generate classes that do most (if not all) of what you want:

    http://code.google.com/p/enumgen/

    The current implementation is in Lisp, but do not hold that against him :-)

提交回复
热议问题