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 operator== for mdarray #355

Open
stefanbajakobsson opened this issue Aug 28, 2024 · 3 comments
Open

Implement operator== for mdarray #355

stefanbajakobsson opened this issue Aug 28, 2024 · 3 comments

Comments

@stefanbajakobsson
Copy link

It would be convenient if the operator== would be implemented for the class mdarray.

@mhoemmen
Copy link
Contributor

I wouldn't object to P1684 changing to include an operator==, as long as operator== is constrained on the element type being equality comparable.

operator<=> wouldn't make so much sense. std::vector::operator<=> is defined in terms of the order of elements. It iterates from .begin() to .end() and returns operator<=> evaluated on the first non-equivalent pair of elements. mdarray deliberately does not expose an iterator range or define a 1-D iteration order.

@mhoemmen
Copy link
Contributor

@crtrott @dalg24 @nmm0

@crtrott
Copy link
Member

crtrott commented Sep 4, 2024

Agreed.

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

No branches or pull requests

3 participants