Skip to content

Commit

Permalink
Fix cuco::pair(std::pair(...)) compile error with clang 17
Browse files Browse the repository at this point in the history
  In file included from cuco/static_map.cuh:24:
  cuco/pair.cuh:91:12: error: no matching
        function for call to 'get'
     91 |            cuda::std::get<1>(thrust::raw_reference_cast(p))}
        |            ^~~~~~~~~~~~~~~~~

The constructor for cuco::pair wasn't taking a std::pair correctly.  Fix
that.

Signed-off-by: Austin Schuh <[email protected]>
  • Loading branch information
AustinSchuh committed Nov 16, 2023
1 parent 436ac7e commit bb857d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/cuco/pair.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ struct alignas(detail::pair_alignment<First, Second>()) pair {
*/
template <typename T, std::enable_if_t<detail::is_std_pair_like<T>::value>* = nullptr>
__host__ __device__ constexpr pair(T const& p)
: pair{cuda::std::get<0>(thrust::raw_reference_cast(p)),
cuda::std::get<1>(thrust::raw_reference_cast(p))}
: pair{std::get<0>(thrust::raw_reference_cast(p)),
std::get<1>(thrust::raw_reference_cast(p))}
{
}

Expand Down

0 comments on commit bb857d8

Please sign in to comment.