VC++ 2017 seeing part of variable name as ||

I realize I can fix this by changing the variable name, but i really want to know WHY this is erroring this way.

code line is: /* [case()] */ NODERESTRICTION orRestrictionName;

I am getting a C2059 syntax error ||.

Why is VC++ 2017 seeing an or that is part of the variable name as an actual or that should be changed to ||?

This is one I have never run into before...
Can you show more code?
Showing more of the offending code AND pasting the ENTIRE error code you are receiving would be very helpful. A C2059 error code has a number of possible causes.
https://docs.microsoft.com/en-us/cpp/error-messages/compiler-errors-1/compiler-error-c2059?view=vs-2019
I apologize for not adding enough code - I didn't realize the line wouldn't be enough in this instance. However, silly me missed the comment above the code anyway that says clearly:

// NOTE: When using the /permissive- compiler switch the below structure
// will not compile due to the case(RTOr) member 'or'. If compiling with the /permissive-
// switch please also define QUERY_H_RESTRICTION_PERMISSIVE

Thank you Furry Guy and Ganado for posting despite my thinking errors on the 29th!!!
Registered users can post here. Sign in or register to post.