Always optimize StringView::strlen (recursive due to constexpr)
This commit is contained in:
parent
fbcc979117
commit
b5ab318a2d
|
@ -164,6 +164,7 @@ public:
|
||||||
ZeroTerminatedString zstr() const { return {begin(), end()}; }
|
ZeroTerminatedString zstr() const { return {begin(), end()}; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
[[gnu::optimize(3)]] // this is recursive for constexpr reason
|
||||||
static constexpr ByteCount strlen(const char* s)
|
static constexpr ByteCount strlen(const char* s)
|
||||||
{
|
{
|
||||||
return *s == 0 ? 0 : strlen(s+1) + 1;
|
return *s == 0 ? 0 : strlen(s+1) + 1;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user