UTF-8 character literals.

This commit is contained in:
Anthony Calandra
2017-01-15 18:06:21 -05:00
parent ffe72e9d84
commit 1f3a7a3316

View File

@@ -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<S>() == 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