I have
enum class ErrorLevel
{
VERBOSE,
DEBUG_,
INFORMATION,
WARNING,
ERROR
};
This works:
assertDetectionParameters( parameterSet, ErrorLevel::WARNING );
This does not:
assertDetectionParameters( parameterSet, ErrorLevel::ERROR );
Error 1 error C2589: 'constant' : illegal token on right side of '::'
Error 2 error C2059: syntax error : '::'
Resharper says:
"ErrorLevel does not name a value"
I get this error for certain names in my enum.
ERROR
is probably already a preprocessor macro somewhere. Try changing it to something else, e.g. ERROR_
, in order to test this hypothesis. Alternatively run your code through the preprocessor to see what substitutions are being made (gcc -E ...
or whatever the equivalent is in Visual Studio).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With