[cfe-dev] [PATCH] C++0x unicode string and character literals now with test cases

John Bytheway jbytheway+llvm at gmail.com
Wed Aug 24 01:50:58 PDT 2011


On 24/08/11 05:14, Seth Cantrell wrote:
> 
> Attached is a patch which allows UTF-16 and UTF-32 string literals to
> work as expected (i.e., the source string literal data is converted
> from the input encoding (currently always UTF-8) to UTF-16 and
> UTF-32, and can be accessed as such at runtime).

Don't forget that C++0x also allows compile-time access through the new
constexpr features.  For example, the following is valid:

static_assert(u"\U0001F47F B"[3] == 0x42);

Your implementation should have this use case in mind.

John Bytheway




More information about the cfe-dev mailing list