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

Extended enum support #503

Merged
merged 2 commits into from
Nov 16, 2016
Merged

Extended enum support #503

merged 2 commits into from
Nov 16, 2016

Conversation

pschella
Copy link
Contributor

  • Allow enums to be ordered
  • Support binary operators (& and | for unscoped enums only)

@wjakob
Copy link
Member

wjakob commented Nov 15, 2016

Should there be xor and binary negation for completeness?

@pschella
Copy link
Contributor Author

Yes, added ^ and ~.

@wjakob
Copy link
Member

wjakob commented Nov 16, 2016

Looks good, thanks!

@wjakob wjakob merged commit 90d2780 into pybind:master Nov 16, 2016
wjakob added a commit to wjakob/pybind11 that referenced this pull request Nov 17, 2016
Following commit 90d278, the object code generated by the python
bindings of nanogui (github.com/wjakob/nanogui) went up by a whopping
12%. It turns out that that project has quite a few enums where we don't
really care about arithmetic operators.

This commit thus partially reverts the effects of pybind#503 by introducing
an additional attribute py::arithmetic() that must be specified if the
arithmetic operators are desired.
wjakob added a commit to wjakob/pybind11 that referenced this pull request Nov 17, 2016
Following commit 90d278, the object code generated by the python
bindings of nanogui (github.com/wjakob/nanogui) went up by a whopping
12%. It turns out that that project has quite a few enums where we don't
really care about arithmetic operators.

This commit thus partially reverts the effects of pybind#503 by introducing
an additional attribute py::arithmetic() that must be specified if the
arithmetic operators are desired.
wjakob added a commit that referenced this pull request Nov 17, 2016
Following commit 90d278, the object code generated by the python
bindings of nanogui (github.com/wjakob/nanogui) went up by a whopping
12%. It turns out that that project has quite a few enums where we don't
really care about arithmetic operators.

This commit thus partially reverts the effects of #503 by introducing
an additional attribute py::arithmetic() that must be specified if the
arithmetic operators are desired.
@rwgk rwgk mentioned this pull request Feb 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants