I am facing problem where I want to create compile time error.I am modifying macro which takes one parameter and then it need to be evaluated against various enum values and if it matches with none of them then I need to create compile time error.
According to my understanding enum is the run time construct just like constant but can be defined as type .But its not available at preprocessing stage.
Please help me out about this issue.
You can't mix C++ and CPP (preprocessor) data. So if the argument to the macro is a C++ variable/const/whatever it won't work. Also, you can't use enum.
Why are you trying to do this? (Or, what are you trying to do?)