diff --git a/ostd/string.hh b/ostd/string.hh index 9510466..57e6b59 100644 --- a/ostd/string.hh +++ b/ostd/string.hh @@ -270,6 +270,16 @@ public: p_len = v.size(); } + template + StringBase(U v, const EnableIf< + IsConvertible::value && !IsArray::value, A + > &a = A()): StringBase(ConstRange(v), a) {} + + template + StringBase(U (&v)[N], const EnableIf< + IsConvertible::value, A + > &a = A()): StringBase(ConstRange(v), a) {} + template::value && IsConvertible, Value>::value @@ -745,7 +755,7 @@ template<> struct ToString { using Argument = bool; using Result = String; String operator()(bool b) { - return String(b ? "true" : "false"); + return b ? "true" : "false"; } };