are there any restrictions / problems using an enum as template (type) argument in C++?
Example:
enum MyEnum
{
A, B, C, D, E
};
template
MSVC handles enum (value) template parameters strangely. Enums are promoted to int
improperly sometimes and the operators aren't defined properly. It seems that they don't really test the template engine with enum
types.
Proving it's a compiler bug is simple: put valid code in and observe whether it successfully compiles. Your example is obviously compliant, so the problem (or the mistake, anyway) is theirs.
Edit: on closer inspection you say that the example does not reproduce the bug. Neither we nor anyone else can help you until you produce an example that does.