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.master
parent
adc2666dbb
commit
30cf50e6af
|
|
@ -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<> \
|
||||
|
|
|
|||
Loading…
Reference in New Issue