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

Remove and from C++ headers #6003

Merged
merged 1 commit into from
Jan 25, 2023
Merged

Remove and from C++ headers #6003

merged 1 commit into from
Jan 25, 2023

Conversation

d-b-w
Copy link
Contributor

@d-b-w d-b-w commented Jan 24, 2023

and is a C++ keyword, but it isn't supported by default on some compilers (msvc). I'd like to disable it on all platforms in Schrödinger builds so that developers don't accidentally post code that fails on a single platform.

However, that means external headers need to use && and || instead of and and or, even in platform-specific code.

`and` is a C++ keyword, but it isn't supported by default on
some compilers (msvc). I'd like to disable it on _all_ platforms
in Schrodinger builds so that people don't accidentally post
code that fails on a single platform.

However, that means external headers need to use `&&` and `||`
instead of `and` and `or`, even in platform-specific code.
@bp-kelley
Copy link
Contributor

I used to do this when going from python to c++ as well, Gcc should not accept this in my opinion!

@greglandrum greglandrum added bug Cleanup Code cleanup and refactoring labels Jan 25, 2023
@greglandrum greglandrum added this to the 2022_09_5 milestone Jan 25, 2023
Copy link
Member

@greglandrum greglandrum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@greglandrum greglandrum merged commit b98f79f into rdkit:master Jan 25, 2023
@d-b-w
Copy link
Contributor Author

d-b-w commented Jan 25, 2023

yeah, I'm gonna turn on -fno-operator-names for our gcc and clang builds

greglandrum pushed a commit that referenced this pull request Feb 23, 2023
`and` is a C++ keyword, but it isn't supported by default on
some compilers (msvc). I'd like to disable it on _all_ platforms
in Schrodinger builds so that people don't accidentally post
code that fails on a single platform.

However, that means external headers need to use `&&` and `||`
instead of `and` and `or`, even in platform-specific code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Cleanup Code cleanup and refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants