GltfImporter: fix libc++15 build#131
Conversation
|
Strange, my MSVC CIs passed even without this include, so I wonder what am I missing in my test setup...
|
|
Oops. It's not MSVC but native clang 15.0.2 (C++20; mingw-w64 CRT; libc++; no MSVC STL; no GNU). The error is: c:/msys64/clang64/include/c++/v1/__algorithm/iterator_operations.h:100:92: error: no type named 'reference' in 'std::iterator_traits<Corrade::Containers::StridedIterator<1, Corrade::Containers::Pair<Corrade::Containers::BasicStringView<const char>, unsigned int>>>'
static_assert(is_same<__deref_t<_Iter>, typename iterator_traits<__uncvref_t<_Iter> >::reference>::value,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
c:/msys64/clang64/include/c++/v1/__algorithm/iterator_operations.h:115:5: note: in instantiation of function template specialization 'std::_IterOps<std::_ClassicAlgPolicy>::__validate_iter_reference<Corrade::Containers::StridedIterator<1, Corrade::Containers::Pair<Corrade::Containers::BasicStringView<const char>, unsigned int>> &>' requested here
__validate_iter_reference<_Iter>();
^
c:/msys64/clang64/include/c++/v1/__algorithm/unique.h:38:44: note: in instantiation of function template specialization 'std::_IterOps<std::_ClassicAlgPolicy>::__iter_move<Corrade::Containers::StridedIterator<1, Corrade::Containers::Pair<Corrade::Containers::BasicStringView<const char>, unsigned int>> &>' requested here
*++__first = _IterOps<_AlgPolicy>::__iter_move(__i);
|
|
Ah, okay. There's already one such conditional include a bit below at magnum-plugins/src/MagnumPlugins/GltfImporter/GltfImporter.cpp Lines 72 to 76 in 6da185c If you change it to I still need to investigate locally if it's something that affects libc++ elsewhere, because it feels strange it would have this problem only on one platform. |
|
I think it's going to happen on all platforms clang 15 + libc++ is invoked on. At least there's nothing mingw-specific. |
7238851 to
43f7ddf
Compare
Complains about `std::unique`.
43f7ddf to
5d92a23
Compare
Use @mosra's #ifdef check, Co-authored-by: Vladimír Vondruš <mosra@centrum.cz>
Codecov ReportBase: 96.81% // Head: 96.81% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## master #131 +/- ##
=======================================
Coverage 96.81% 96.81%
=======================================
Files 130 130
Lines 13902 13902
=======================================
Hits 13459 13459
Misses 443 443
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
|
Merged as c8bd027, thanks! |
No description provided.