cpp/locale/wstring convert/from bytes

Performs multibyte to wide conversion, using the facet supplied at construction.

1) Converts as if it was a string of length  to.

2) Converts the null-terminated multibyte character sequence beginning at the character pointed to by to.

3) Converts the narrow string to.

4) Converts the narrow multibyte character sequence to.

In all cases, the conversion begins in initial shift state, unless non-initial starting state was provided to this constructor. The number of characters converted and the final value of the conversion state are remembered and can be accessed with state and converted.

Return value
A object containing the results of multibyte to wide conversion. If the conversion failed and there was a user-supplied wide-error string provided to the constructor of this, returns that wide-error string.

Exceptions
If this object was constructed without a user-supplied wide-error string, throws std on conversion failure.