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 i = std::find_if_not(s.begin(), s.end(),
|
||||||
[](auto ch){ return IsWhitespaceOrNull(ch); });
|
[](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 {
|
return {
|
||||||
i,
|
i,
|
||||||
s.end(),
|
s.end(),
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
|
Loading…
Reference in New Issue
Block a user