util/StringStrip: add libc++ compatibility kludge
This commit is contained in:
parent
60ca12e4bd
commit
5ec13c0b06
@ -57,10 +57,15 @@ StripLeft(const std::string_view s) noexcept
|
||||
auto i = std::find_if_not(s.begin(), s.end(),
|
||||
[](auto ch){ return IsWhitespaceOrNull(ch); });
|
||||
|
||||
#ifdef __clang__
|
||||
// libc++ doesn't yet support the C++20 constructor
|
||||
return s.substr(std::distance(s.begin(), i));
|
||||
#else
|
||||
return {
|
||||
i,
|
||||
s.end(),
|
||||
};
|
||||
#endif
|
||||
}
|
||||
|
||||
const char *
|
||||
|
Loading…
Reference in New Issue
Block a user