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

Implement Mask::invert() #10

Open
kabasset opened this issue Jun 25, 2023 · 2 comments
Open

Implement Mask::invert() #10

kabasset opened this issue Jun 25, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@kabasset
Copy link
Owner

Or anything better named, e.g. operator-() for new instance, or match bitset wording.

@kabasset kabasset added enhancement New feature or request good first issue Good for newcomers labels Jun 25, 2023
@kabasset kabasset self-assigned this Jun 25, 2023
@kabasset
Copy link
Owner Author

bitset provides flip() which is ambiguous wrt. flipping the ordering.
Operators ! or ~ seem appropriate for new instances. One would write:

for (const auto& p : not mask) ...
for (const auto& p : !mask) ...
for (const auto& p : ~mask) ...

@kabasset
Copy link
Owner Author

bitset uses operator~() while valarray<bool> uses both while seems to favor operator!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant