-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add default equality operators #22
base: main
Are you sure you want to change the base?
Conversation
60ab9c2
to
504a62e
Compare
Mygdonus isn't going to be able to move to C++20 for a while yet |
@@ -162,11 +194,15 @@ namespace gs | |||
Loc1 scale; | |||
Boolean active; | |||
std::optional<ObjectID> parent; | |||
|
|||
bool operator==(const Object1 &other) const = default; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason this one (and a couple of others) use operator==
and the most use operator<=>
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had some issues with <=>
not being defined on std::optional
or std::vector
(which might vary by implementation?), so for the types using those I just stuck with the equality that I needed.
@@ -11,7 +11,7 @@ add_library(gse | |||
|
|||
set_target_properties(gse | |||
PROPERTIES | |||
CXX_STANDARD 17 | |||
CXX_STANDARD 20 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is everyone dependent on this code OK with the move to C++20?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No
Adds C++20 equality/spaceship default operators.