summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2021-11-23 14:25:16 -0500
committerNat Goodspeed <nat@lindenlab.com>2021-11-23 14:25:16 -0500
commit30cf50e6af3183680bd6413573eecd95b1f4fbb5 (patch)
tree725044faf639da0ba317490e694fa6b9c8a122fe /indra
parentadc2666dbb2444194a5df84711207def7eba074c (diff)
SL-16094: Support ll_convert<std::string>(const char*)
and correspondingly, ll_convert<std::wstring>(const wchar_t*). Now that we're using ll_convert() for single-argument stringize(arg), make sure it can efficiently handle the simple case of constructing a string from a const char pointer.
Diffstat (limited to 'indra')
-rw-r--r--indra/llcommon/llstring.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h
index 54e3f9ee63..d94f549480 100644
--- a/indra/llcommon/llstring.h
+++ b/indra/llcommon/llstring.h
@@ -529,6 +529,13 @@ struct ll_convert_impl<T, T>
T operator()(const T& in) const { return in; }
};
+// simple construction from char*
+template<typename T>
+struct ll_convert_impl<T, const typename T::value_type*>
+{
+ T operator()(const typename T::value_type* in) const { return { in }; }
+};
+
// specialize ll_convert_impl<TO, FROM> to return EXPR
#define ll_convert_alias(TO, FROM, EXPR) \
template<> \