There is no analogue of constexpr __builtin_strlen for MSVC, so make it through defines as it was done for char_traits<wchar_t>
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
What version of MSVC are you trying to use?
Last I checked we don't support MSVC.
__string | ||
---|---|---|
268 | This doesn't work for GCC. |
Comment Actions
We are using Microsoft Visual C++ 2017 14.16.27012 -- almost the last version
Marshall asked us to send all the patches that we did to make libcxx work for Windows
__string | ||
---|---|---|
269 | How about #ifndef _LIBCPP_COMPILER_MSVC return __builtin_strlen(__s); #else ... #endif |
__string | ||
---|---|---|
269 | done |
include/__string | ||
---|---|---|
216 ↗ | (On Diff #186183) | Please keep the declaration the same. |
Comment Actions
I believe it is supported from C++17 --
https://godbolt.org/z/8xsDxu -- C++17
https://godbolt.org/z/SNUPsj -- C++14
This doesn't work for GCC.