Fix building against libc++ on Windows#1777
Fix building against libc++ on Windows#1777georgthegreat wants to merge 2 commits intoNVIDIA:mainfrom
Conversation
In microsoft/stl `std::_Unwrapped_t` [is just](https://github.com/microsoft/STL/blob/2a1b881e2fae9c42026040a7fdfc5a93e59a91c8/stl/inc/xutility#L935) `std::remove_cvref_t`.
|
Can one of the admins verify this patch? Admins can comment |
|
Unfortunately that is not the whole truth. MSVC has checked iterators for their containers. Those e.g do additional bounds checking in Debug builds. The unwrapped iterators do not do anything in that regard, but might be different types. E.g. for std::vector we have a bespoke iterator class and the unwrapped iterator is just a plain pointer. https://github.com/microsoft/STL/blob/8ca7bd3c002d383940de9abe6379721e96eb12e3/stl/inc/vector#L1909-L1923 |
|
So, how do I make thrust compile againt different STL on Windows? |
|
That depends a lot on what you want to do. What VS version do you have, what CUDA version etc. (AFAIK 11.6 is needed for current MSVC STL) |
In microsoft/stl
std::_Unwrapped_tis juststd::remove_cvref_t(and before C++20 you have to combine the latter fromstd::remove_referenceandstd::remove_cv).