Skip to content

Adapt MemoryOrder definition for C++ 20 #533

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

Merged
merged 1 commit into from
Sep 20, 2023

Conversation

SeverinLeonhardt
Copy link
Contributor

When compiling the code with C++ 20 the following error message is produced:

enumerator value for ‘MEMORY_ORDER_RELAXED’ must have integral or unscoped enumeration type

This is because with C++ 20 the type of those values changed to an enum class. The static_cast extracts the numeric values so they can be used here as before.

When compiling the code with C++ 20 the following error message is
produced:

    enumerator value for ‘MEMORY_ORDER_RELAXED’ must have integral or unscoped enumeration type

This is because with C++ 20 the type of those values changed to an enum
class. The `static_cast` extracts the numeric values so they can be used
here as before.
@absurdfarce
Copy link
Collaborator

Thanks for the contributions @SeverinLeonhardt, this one as well as the other two PRs. Unfortunately I've been completely swamped recently (thus the delay in getting back to you) but I'll try to take a look at these PRs next week!

@absurdfarce
Copy link
Collaborator

Finally got a chance to take a look at this one @SeverinLeonhardt. That's a nice and elegant way to solve that issue... and degrades nicely for the C++11 case (which is the default).

Many thanks for the solid contribution! And again, my apologies for the delay; we're trying to get back on track here.

@absurdfarce absurdfarce merged commit 81a930f into datastax:master Sep 20, 2023
absurdfarce added a commit that referenced this pull request Oct 2, 2023
…e MemoryOrder

enum work with C++ 20 but apparently some older gcc instance still want the type_traits
include that defines the underlying_type template.
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.

2 participants