Skip to content

Commit

Permalink
Fixes #618: Used a defaulted comparison operator in C++20 and later
Browse files Browse the repository at this point in the history
  • Loading branch information
eyalroz committed Mar 22, 2024
1 parent 80458c4 commit b44a6d3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/cuda/api/launch_configuration.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ struct launch_configuration_t {
} clustering;
#endif // CUDA_VERSION >= 12000

#if __cplusplus >= 202002L
constexpr auto operator<=>(const launch_configuration_t&) const noexcept = default;
#endif
public: // non-mutators

/**
Expand Down Expand Up @@ -186,6 +189,7 @@ struct launch_configuration_t {
CPP14_CONSTEXPR launch_configuration_t& operator=(launch_configuration_t&&) = default;
};

#if __cplusplus < 202002L
constexpr bool operator==(const launch_configuration_t lhs, const launch_configuration_t& rhs) noexcept
{
return
Expand All @@ -206,6 +210,7 @@ constexpr bool operator!=(const launch_configuration_t lhs, const launch_configu
{
return not (lhs == rhs);
}
#endif

namespace detail_ {

Expand Down

0 comments on commit b44a6d3

Please sign in to comment.