Skip to content

Commit 813e75e

Browse files
authored
Fix __is_primary_std_template for libc++ (#6243)
We were using the wrong check, so that we would check for a specialization of `::cuda::std::iterator_traits` instead of `::std::iterator_traits` Fixes #6238
1 parent 8e61203 commit 813e75e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

libcudacxx/include/cuda/std/__type_traits/is_primary_template.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,13 @@ template <class _Iter>
8484
struct __is_primary_std_template : bool_constant<__is_primary_std_template_impl<_Iter, is_pointer_v<_Iter>>>
8585
{};
8686
# elif defined(_LIBCPP_VERSION)
87+
8788
// libc++ uses the same mechanism than we do with __primary_template
8889
template <class _Traits>
8990
using __test_for_primary_std_template = enable_if_t<_IsSame<_Traits, typename _Traits::__primary_template>::value>;
9091
template <class _Iter>
91-
using __is_primary_std_template = _IsValidExpansion<__test_for_primary_template, ::std::iterator_traits<_Iter>>;
92+
using __is_primary_std_template = _IsValidExpansion<__test_for_primary_std_template, ::std::iterator_traits<_Iter>>;
93+
9294
# elif defined(_MSVC_STL_VERSION) || defined(_IS_WRS)
9395
// On MSVC we must check for the base class because `_From_primary` is only defined in C++20
9496
template <class _Iter, bool>

0 commit comments

Comments
 (0)