Open hofst opened 8 months ago
@llvm/issue-subscribers-clang-frontend
Author: Sebastian Hofstetter (hofst)
CC @AaronBallman
CC @CaseyCarter
This is due to #61763, which I believe has been fixed for LLVM 18. We applied a workaround to the STL in https://github.com/microsoft/STL/pull/4014, which unfortunately didn't make the VS 2022 v17.8 release. It is available in the 17.9 previews, if that helps.
@CaseyCarter thanks ! I think that answers the user's question (and we have no way to fix clang 17 on our side either at this stage)
We are seeing this same issue with Clang 18.1.4 and MSVC-14.38.33130
Error: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.38.33130\include\ranges:8217:26: error: requires clause differs in template redeclaration
8217 | requires _Zip_transform_constraints<_Func, _OtherViews...>
| ^
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.38.33130\include\ranges:8514:31: note: in instantiation of template class 'std::ranges::zip_view<std::ranges::ref_view<std::vector<std::filesystem::path>>, std::ranges::ref_view<std::vector<murisuite::Beam>>>::_Iterator<true>' requested here
8514 | noexcept(noexcept(_Iterator<true>{_Tuple_transform(_RANGES begin, _Views)})) // strengthened
| ^
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.38.33130\include\ranges:8513:35: note: in instantiation of exception specification for 'begin' requested here
8513 | _NODISCARD constexpr auto begin() const
| ^
D:/a/MuriSuite/MuriSuite/utilities/communication/tests/communicationtests.cpp:260:27: note: in instantiation of member function 'std::ranges::zip_view<std::ranges::ref_view<std::vector<std::filesystem::path>>, std::ranges::ref_view<std::vector<murisuite::Beam>>>::begin' requested here
260 | for(auto [path, beam] : std::views::zip(raysearch_paths, correct_beams))
| ^
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.38.33130\include\ranges:8619:18: note: previous template declaration is here
8619 | requires _Zip_transform_constraints<_Func, _ViewTypes...>
| ^
Error: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.38.33130\include\ranges:8217:26: error: requires clause differs in template redeclaration
8217 | requires _Zip_transform_constraints<_Func, _OtherViews...>
| ^
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.38.33130\include\ranges:8514:47: note: in instantiation of template class 'std::ranges::zip_view<std::ranges::ref_view<std::vector<std::filesystem::path>>, std::ranges::ref_view<std::vector<murisuite::Beam>>>::_Iterator<false>' requested here
8514 | noexcept(noexcept(_Iterator<true>{_Tuple_transform(_RANGES begin, _Views)})) // strengthened
| ^
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.38.33130\include\ranges:8513:35: note: in instantiation of exception specification for 'begin' requested here
8513 | _NODISCARD constexpr auto begin() const
CC @erichkeane
We are seeing this same issue with Clang 18.1.4 and MSVC-14.38.33130
The workaround shipped in VS 17.9p1 and is still present today, so you should be fine with any version of MSVC more recent than 17.8.
Clang 17.0.6 (=latest available version) is incompatible with msvc-14.38.33130 standard library (=latest available version) when using
ranges::views::zip
. The reported error is:A repro can be as simple as: