[Answering only in comp.lang.c++, where I read it]
Maximus said:
wchar_t ch2 = L'\u27BA';
wchar_t ch = '\u27BA';
On Visual C++ 2003 SP1, no compiler warnings are given at all.
However, ch != ch2.
Which one is correct?
The effects of placing a universal-character-name in a narrow
character literal (without the L in front) are implementation-
defined, you better ask in 'microsoft.public.vc.language'. As to
warnings, none required since this is not ill-formed.
I would venture a guess that you need L there to be "correct",
since that makes the character literal to have the type 'wchar_t',
which is what you declare 'ch2'. Without the L, the type of the
character literal is 'char', and how it gets converted into the
'wchar_t' for 'ch' is implementation-defined.
V