Archived
This forum has been archived. Please start a new discussion on GitHub.
Allow using C++11 enum classes
Hi,
it would be great if strongly typed enums (enum classes) could be included in the C++ language mapping (probably triggered by an attribute). Beyond the benefit of type safety this would also allow using them like they're used in other language mappings.
E.g.
Would map to C++:
And be used like this:
Cheers,
Michael
it would be great if strongly typed enums (enum classes) could be included in the C++ language mapping (probably triggered by an attribute). Beyond the benefit of type safety this would also allow using them like they're used in other language mappings.
E.g.
enum Normal
{
one,
two,
three
};
["cpp:class"]
enum Strong
{
alpha,
beta,
gamma
};
Would map to C++:
enum Weak
{
one,
two,
three
};
enum class Strong
{
alpha,
beta,
gamma
};
And be used like this:
Weak w = one; Strong s = String::alpha;
Cheers,
Michael
0