Skip to content

Conversation

@RichLogan
Copy link
Contributor

@RichLogan RichLogan commented Nov 7, 2023

Adds C++20 equality/spaceship default operators.

@RichLogan RichLogan requested a review from paulej November 7, 2023 11:50
@JulesRapanga
Copy link
Contributor

Mygdonus isn't going to be able to move to C++20 for a while yet

Boolean active;
std::optional<ObjectID> parent;

bool operator==(const Object1 &other) const = default;
Copy link
Contributor

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<=>?

Copy link
Contributor Author

@RichLogan RichLogan Nov 7, 2023

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.

set_target_properties(gse
PROPERTIES
CXX_STANDARD 17
CXX_STANDARD 20
Copy link
Contributor

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?

Copy link
Contributor

Choose a reason for hiding this comment

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

No

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.

3 participants