Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • This surprised me a lot...I thought that one can never initial a wstring using a const char* literal until I read this... Commented Jan 13, 2018 at 10:29
  • 1
    @Edityouprofile: It's not actually initializing the wstring from const char *. It's copying individual character values from a range of chars and relying on implicit conversion to turn them into wchar_ts (or whatever the destination character type is). For true 7-bit ASCII values, the implicit conversion does the right thing. Commented Jan 14, 2018 at 1:30