summaryrefslogtreecommitdiff
path: root/src/string.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/string.hh')
-rw-r--r--src/string.hh1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/string.hh b/src/string.hh
index 6b66bce4..a6a267cb 100644
--- a/src/string.hh
+++ b/src/string.hh
@@ -164,6 +164,7 @@ public:
ZeroTerminatedString zstr() const { return {begin(), end()}; }
private:
+ [[gnu::optimize(3)]] // this is recursive for constexpr reason
static constexpr ByteCount strlen(const char* s)
{
return *s == 0 ? 0 : strlen(s+1) + 1;