From a6031c7720761038aad1a06edcb7d121590a22f2 Mon Sep 17 00:00:00 2001 From: Maxim Prokhorov Date: Thu, 30 Mar 2023 11:34:34 +0300 Subject: [PATCH] types: real pointer should take precedence over array *should* fix most constexpr'ness issues when inlining (but, now has a small overhead of template instantiation) --- code/espurna/types.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/espurna/types.h b/code/espurna/types.h index c57ef98a..44acdd9c 100644 --- a/code/espurna/types.h +++ b/code/espurna/types.h @@ -264,7 +264,8 @@ struct StringView { _len(len) {} - constexpr StringView(const char* ptr) noexcept : + template ::value>::type> + constexpr StringView(T ptr) noexcept : StringView(ptr, __builtin_strlen(ptr)) {}