1
0
Fork 0
mirror of https://github.com/Neargye/magic_enum.git synced 2026-01-10 23:44:29 +00:00
This commit is contained in:
neargye 2020-08-16 17:43:22 +05:00
parent 521b753a86
commit 02f2249239
4 changed files with 34 additions and 33 deletions

View file

@ -226,6 +226,7 @@ inline constexpr bool is_enum_v = std::is_enum_v<T> && std::is_same_v<T, std::de
constexpr std::size_t find(std::string_view str, char c) noexcept {
#if defined(__clang__) && __clang_major__ < 9 && defined(__GLIBCXX__)
// https://stackoverflow.com/questions/56484834/constexpr-stdstring-viewfind-last-of-doesnt-work-on-clang-8-with-libstdc
for (std::size_t i = 0; i < str.size(); ++i) {
if (str[i] == c) {
return i;