I have an old C library and I have to wrap it inside a C++ environment. I use C++11 enum class
because they're so useful and I'd like to do transform the original enum
into a new enum class
without simply create the new enum class
and rewriting it. I'd like to do something like a typedef
as in the old C:
enum num_oldc
{
one,
two,
three
};
typedef enum num_oldc num_oldc_t;
But one_t
must be accessible via its scope num_t::two
exactly in the same way I can access a new C++11 enum class
.