From 1f3a7a33160865d3780ccf053c0baa5ddb7c42d1 Mon Sep 17 00:00:00 2001 From: Anthony Calandra Date: Sun, 15 Jan 2017 18:06:21 -0500 Subject: [PATCH] UTF-8 character literals. --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 2deaa69..bb41eea 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ C++17 includes the following new language features: - [structured bindings](#structured-bindings) - [selection statements with initializer](#selection-statements-with-initializer) - [constexpr if](#constexpr-if) +- [utf-8 character literals](#utf-8-character-literals) C++17 includes the following new library features: - [std::variant](#stdvariant) @@ -259,6 +260,12 @@ struct S {}; static_assert(isIntegral() == false); ``` +### UTF-8 Character Literals +A character literal that begins with `u8` is a character literal of type `char`. The value of a UTF-8 character literal is equal to its ISO 10646 code point value. +```c++ +char x = u8'x'; +``` + ## C++17 Library Features ### std::variant