Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#define or || #1379

Closed
SapphireBrand opened this issue Dec 1, 2018 · 1 comment
Closed

#define or || #1379

SapphireBrand opened this issue Dec 1, 2018 · 1 comment
Labels
solution: invalid the issue is not related to the library

Comments

@SapphireBrand
Copy link

  • What is the issue you have?

I had a variable named "or", and my compiler issues an error message about "unexpected ||", so I guessed that there might be a stray #define that has not been #undefed.

  • Please describe the steps to reproduce the issue. Can you provide a small but working code example?

  • What is the expected behavior?

I expect the header library to only export genuinely public symbols. Maybe #undef 'or' before the end of the header, or do without the #define.

  • And what is the actual behavior instead?

  • Which compiler and operating system are you using? Is it a supported compiler?

  • Did you use a released version of the library or the version from the develop branch?

  • If you experience a compilation error: can you compile and run the unit tests?

@nlohmann
Copy link
Owner

nlohmann commented Dec 1, 2018

or is an operator, see https://en.cppreference.com/w/cpp/language/operator_alternative. You should not use it as a name.

@nlohmann nlohmann added the solution: invalid the issue is not related to the library label Dec 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solution: invalid the issue is not related to the library
Projects
None yet
Development

No branches or pull requests

2 participants