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

[BUG]: libcu++ should support the three-way comparison operator #2947

Open
1 task done
ericniebler opened this issue Nov 24, 2024 · 1 comment
Open
1 task done

[BUG]: libcu++ should support the three-way comparison operator #2947

ericniebler opened this issue Nov 24, 2024 · 1 comment
Labels
bug Something isn't working right.

Comments

@ericniebler
Copy link
Collaborator

Is this a duplicate?

Area

libcu++

Is your feature request related to a problem? Please describe.

in cuda/std/detail/libcxx/include/__config there is this:

// FIXME: Correct this macro when either (A) a feature test macro for the
// spaceship operator is provided, or (B) a compiler provides a complete
// implementation.
#  define _LIBCUDACXX_HAS_NO_SPACESHIP_OPERATOR

a lot of code is hidden behind the _LIBCUDACXX_HAS_NO_SPACESHIP_OPERATOR macro, which is set unconditionally. this needs attention.

Describe the solution you'd like

properly support the three-way comparison operator when it is available.

Describe alternatives you've considered

No response

Additional context

No response

@ericniebler ericniebler added the bug Something isn't working right. label Nov 24, 2024
@miscco
Copy link
Collaborator

miscco commented Nov 25, 2024

This does not work because three-way-comparison operators default to named types within namespace std that are provided by the standard library and are not annotated as __host__ __device__. We do not want to require our users to build with --relaxed-constexpr

We would need to get every standard library on board to add related annotations to the orderings and would most likely need approval to maintain that indefinitely

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working right.
Projects
None yet
Development

No branches or pull requests

2 participants