mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-07 17:41:11 +00:00
Use strlen when possible since it's constexpr on gcc
This commit is contained in:
parent
918bb1ce8f
commit
59c268a5f8
@ -230,6 +230,9 @@ FMT_CONSTEXPR size_t length(const Char *s) {
|
||||
while (*s) ++s;
|
||||
return s - start;
|
||||
}
|
||||
#if FMT_GCC_VERSION
|
||||
FMT_CONSTEXPR size_t length(const char *s) { return std::strlen(s); }
|
||||
#endif
|
||||
} // namespace internal
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user