c-smile / sciter-sdk

Sciter is an embeddable HTML/CSS/scripting engine
http://sciter.com
Other
2.11k stars 223 forks source link

Provide overloads with wchar_T in non Windows systems #205

Closed NN--- closed 2 years ago

NN--- commented 3 years ago

For instance this code doesn't compile on Mac:

// string get(const WCHAR* defv) const
get(L""); // Cannot convert wchar_t const* to WCHAR
c-smile commented 3 years ago

You can use either:

get(u"")

Or there is WSTR(string literal) for that:

get(WSTR(""))

See: https://en.cppreference.com/w/cpp/language/string_literal

NN--- commented 3 years ago

u"" has type const char16_t[N] while there is no such overload. char16_t is a distinct type.