This directory contains several different implementations of a
typesafe enum class for C++.

They are described at: http://m17n.org/martin/writings/typesafe-enums.html

joshua                     - direct translation of Joshua Bloch's
                             typesafe enum class from Java into C++.

visitor                    - Use the visitor pattern

singleton                  - Implement each enumerator as the 
                             unique instance of a singleton class

derived-singleton          - each enumerator is the unique instance of a
                             singleton class derived from the primary class.

derived-template-singleton - like derived-singleton, but uses
                             templates to eliminate repeated code.


Each implementation has a test suite.  To run the tests, do:

make g++                # requires g++
make icc                # requires Intel's icc compiler
make compile-errors     # requires g++ and java 1.4
make tests              # run all of the above

Since type safety is our objective here, so we care about producing
_more_ compile errors.  The `compile-errors' target checks that
constructs that are expected to fail to compile do, in fact, generate
compile errors.

Martin Buchholz
