0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-10-01 21:28:53 +02:00

ircd::js: Add an inefficient std::u16string conversion for string.

This commit is contained in:
Jason Volk 2016-11-07 16:28:54 -08:00
parent f92f117edc
commit a3c06466fb

View file

@ -59,6 +59,7 @@ struct string
char16_t operator[](const size_t &at) const;
operator std::string() const;
operator std::u16string() const;
operator JS::Value() const;
using root<JSString *, L>::root;
@ -288,6 +289,13 @@ const
return native(this->get());
}
template<lifetime L>
string<L>::operator std::u16string()
const
{
return locale::char16::conv(native(this->get()));
}
template<lifetime L>
char *
string<L>::c_str()