From 437f20dee390ba3bf6a128be2bd2ab308f596c14 Mon Sep 17 00:00:00 2001 From: Yuriy Chernyshov Date: Fri, 26 Aug 2022 21:44:27 +0300 Subject: [PATCH 1/2] Fix building against libc++ on Windows In microsoft/stl `std::_Unwrapped_t` [is just](https://github.com/microsoft/STL/blob/2a1b881e2fae9c42026040a7fdfc5a93e59a91c8/stl/inc/xutility#L935) `std::remove_cvref_t`. --- thrust/type_traits/is_contiguous_iterator.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thrust/type_traits/is_contiguous_iterator.h b/thrust/type_traits/is_contiguous_iterator.h index eaa088978..55559f146 100644 --- a/thrust/type_traits/is_contiguous_iterator.h +++ b/thrust/type_traits/is_contiguous_iterator.h @@ -156,7 +156,7 @@ struct is_libstdcxx_normal_iterator< #if _MSC_VER >= 1916 // MSVC 2017 version 15.9. template struct is_msvc_contiguous_iterator - : is_pointer<::std::_Unwrapped_t > {}; + : is_pointer<::std::remove_cvref_t > {}; #elif _MSC_VER >= 1700 // MSVC 2012. template struct is_msvc_contiguous_iterator : false_type {}; From 99695c52dcbb4777af9c6f1ae229ed9c4ea171e4 Mon Sep 17 00:00:00 2001 From: Yuriy Chernyshov Date: Mon, 29 Aug 2022 11:25:38 +0300 Subject: [PATCH 2/2] Do not depend on C++20 remove_cvref trait --- thrust/type_traits/is_contiguous_iterator.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thrust/type_traits/is_contiguous_iterator.h b/thrust/type_traits/is_contiguous_iterator.h index 55559f146..43237fb1e 100644 --- a/thrust/type_traits/is_contiguous_iterator.h +++ b/thrust/type_traits/is_contiguous_iterator.h @@ -156,7 +156,7 @@ struct is_libstdcxx_normal_iterator< #if _MSC_VER >= 1916 // MSVC 2017 version 15.9. template struct is_msvc_contiguous_iterator - : is_pointer<::std::remove_cvref_t > {}; + : is_pointer<::std::remove_reference_t<::std::remove_cv_t>> {}; #elif _MSC_VER >= 1700 // MSVC 2012. template struct is_msvc_contiguous_iterator : false_type {};