This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/50941] [C++0x] user-defined string literals provide incorrect length for wchar_t, char16_t, and char32_t


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50941

--- Comment #1 from Daniel KrÃgler <daniel.kruegler at googlemail dot com> 2011-11-01 10:24:59 UTC ---
I need to make a correction in regard to the actually provided length values:

a) The following assertions incorrectly hold:

static_assert( L""_len == 1, "Ouch");
static_assert( u""_len == 1, "Ouch");
static_assert( U""_len == 3, "Ouch");

b) For non-empty strings other "value patterns" occur, e.g. these tests

static_assert(L"1"_len == 3, "Ouch");
static_assert(u"1"_len == 3, "Ouch");
static_assert(U"1"_len == 7, "Ouch");

evaluate to true, even though the length should be 1 in all these cases.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]