From 3b25bc10febc84f10348715dabc9590458923c0b Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 3 Apr 2024 11:07:36 -0400 Subject: Make ll_convert() and ll_convert_to() use std::decay_t on arg type. Among other things, this empowers ll_convert() and ll_convert_to() to accept a string literal (which might contain non-ASCII characters, e.g. __FILE__). Without this, even though we have ll_convert_impl specializations accepting const char*, passing a string literal fails because the compiler can't find a specialization specifically accepting const char[length]. --- indra/llcommon/llstring.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h index 0eb2770004..14aa51cb4a 100644 --- a/indra/llcommon/llstring.h +++ b/indra/llcommon/llstring.h @@ -37,6 +37,7 @@ #include #include #include +#include #include "llformat.h" #include "stdtypes.h" @@ -542,7 +543,7 @@ public: template inline operator TO() const { - return ll_convert_impl()(mRef); + return ll_convert_impl>()(mRef); } }; @@ -551,7 +552,7 @@ public: template TO ll_convert_to(const FROM& in) { - return ll_convert_impl()(in); + return ll_convert_impl>()(in); } // degenerate case -- cgit v1.2.3