From 58b21474c82b0e5cc0b5b007fef0a7bb3c976981 Mon Sep 17 00:00:00 2001 From: Anthony Calandra Date: Fri, 26 Jun 2020 21:56:15 -0400 Subject: [PATCH] Move std::char8_t to library section. --- CPP20.md | 14 +++++++------- README.md | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/CPP20.md b/CPP20.md index 324310b..a118e54 100644 --- a/CPP20.md +++ b/CPP20.md @@ -13,7 +13,6 @@ C++20 includes the following new language features: - [class types in non-type template parameters](#class-types-in-non-type-template-parameters) - [constexpr virtual functions](#constexpr-virtual-functions) - [explicit(bool)](#explicitbool) -- [char8_t](#char8_t) - [immediate functions](#immediate-functions) - [using enum](#using-enum) @@ -30,6 +29,7 @@ C++20 includes the following new library features: - [std::bit_cast](#stdbit_cast) - [std::midpoint](#stdmidpoint) - [std::to_array](#stdto_array) +- [char8_t](#char8_t) ## C++20 Language Features @@ -298,12 +298,6 @@ foo b = "123"; // ERROR: explicit constructor is not a candidate (explicit speci foo c {"123"}; // OK ``` -### char8_t -Provides a standard type for representing UTF-8 strings. -```c++ -char8_t utf8_str[] = u8"\u0123"; -``` - ### Immediate functions Similar to `constexpr` functions, but functions with a `consteval` specifier must produce a constant. These are called `immediate functions`. ```c++ @@ -493,6 +487,12 @@ int a[] = {1, 2, 3}; std::to_array(a); // returns `std::array` ``` +### char8_t +Provides a standard type for representing UTF-8 strings. +```c++ +char8_t utf8_str[] = u8"\u0123"; +``` + ## Acknowledgements * [cppreference](http://en.cppreference.com/w/cpp) - especially useful for finding examples and documentation of new library features. * [C++ Rvalue References Explained](http://thbecker.net/articles/rvalue_references/section_01.html) - a great introduction I used to understand rvalue references, perfect forwarding, and move semantics. diff --git a/README.md b/README.md index d44c9c2..5ea26f1 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,6 @@ C++20 includes the following new language features: - [class types in non-type template parameters](#class-types-in-non-type-template-parameters) - [constexpr virtual functions](#constexpr-virtual-functions) - [explicit(bool)](#explicitbool) -- [char8_t](#char8_t) - [immediate functions](#immediate-functions) - [using enum](#using-enum) @@ -30,6 +29,7 @@ C++20 includes the following new library features: - [std::bit_cast](#stdbit_cast) - [std::midpoint](#stdmidpoint) - [std::to_array](#stdto_array) +- [char8_t](#char8_t) C++17 includes the following new language features: - [template argument deduction for class templates](#template-argument-deduction-for-class-templates) @@ -391,12 +391,6 @@ foo b = "123"; // ERROR: explicit constructor is not a candidate (explicit speci foo c {"123"}; // OK ``` -### char8_t -Provides a standard type for representing UTF-8 strings. -```c++ -char8_t utf8_str[] = u8"\u0123"; -``` - ### Immediate functions Similar to `constexpr` functions, but functions with a `consteval` specifier must produce a constant. These are called `immediate functions`. ```c++ @@ -586,6 +580,12 @@ int a[] = {1, 2, 3}; std::to_array(a); // returns `std::array` ``` +### char8_t +Provides a standard type for representing UTF-8 strings. +```c++ +char8_t utf8_str[] = u8"\u0123"; +``` + ## C++17 Language Features ### Template argument deduction for class templates