Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Fix building against libc++ on Windows #1777

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

georgthegreat
Copy link

@georgthegreat georgthegreat commented Aug 26, 2022

In microsoft/stl std::_Unwrapped_t is just std::remove_cvref_t (and before C++20 you have to combine the latter from std::remove_reference and std::remove_cv).

@GPUtester
Copy link
Collaborator

Can one of the admins verify this patch?

Admins can comment ok to test to allow this one PR to run or add to allowlist to allow all future PRs from the same author to run.

@miscco
Copy link
Collaborator

miscco commented Aug 29, 2022

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

@georgthegreat
Copy link
Author

So, how do I make thrust compile againt different STL on Windows?
I can check microsoft/stl specific define if it has one.

@miscco
Copy link
Collaborator

miscco commented Aug 29, 2022

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)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants