From 333f7233dc3a0e3aaa10ecce0fa8b2cbd1f46392 Mon Sep 17 00:00:00 2001 From: yoh Date: Thu, 19 Jan 2023 14:36:19 +0900 Subject: [PATCH] =?UTF-8?q?charconv:=20P2291R3=20to=5Fchars/from=5Fchars?= =?UTF-8?q?=20constexpr=E6=8C=87=E5=AE=9A(#1086)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- reference/charconv/from_chars.md | 6 +++++- reference/charconv/to_chars.md | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/reference/charconv/from_chars.md b/reference/charconv/from_chars.md index 98dbda731a..c19cbb24d9 100644 --- a/reference/charconv/from_chars.md +++ b/reference/charconv/from_chars.md @@ -8,7 +8,9 @@ namespace std { //整数型用 from_chars_result from_chars(const char* first, const char* last, - /*see below*/& value, int base = 10); // (1) + /*see below*/& value, int base = 10); // (1) C++17 + constexpr from_chars_result from_chars(const char* first, const char* last, + /*see below*/& value, int base = 10); // (1) C++23 //浮動小数点型用 from_chars_result from_chars(const char* first, const char* last, float& value, @@ -257,3 +259,5 @@ nan - [P0067R5: Elementary string conversions, revision 5](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0067r5.html) - [P0682R1: Repairing elementary string conversions](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0682r1.html) - [How to Use The Newest C++ String Conversion Routines - std::from_chars - Bartek's coding blog ](https://www.bfilipek.com/2018/12/fromchars.html) +- [P2291R3: Add Constexpr Modifiers to Functions to_chars and from_chars for Integral Types in `` Header](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p2291r3.pdf) + - C++23での(1)constexpr指定 diff --git a/reference/charconv/to_chars.md b/reference/charconv/to_chars.md index cb05cd2f4e..0805a8b6ea 100644 --- a/reference/charconv/to_chars.md +++ b/reference/charconv/to_chars.md @@ -7,7 +7,9 @@ ```cpp namespace std { //整数型用 - to_chars_result to_chars(char* first, char* last, /*see below*/ value, int base = 10); // (1) + to_chars_result to_chars(char* first, char* last, /*see below*/ value, int base = 10); // (1) C++17 + constexpr to_chars_result to_chars(char* first, char* last, /*see below*/ value, int base = 10); // (1) C++23 + //boolの変換は禁止 to_chars_result to_chars(char* first, char* last, bool value, int base = 10) = delete; // C++20 @@ -222,3 +224,5 @@ z - [P0682R1: Repairing elementary string conversions](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0682r1.html) - [LWG Issue 3266. `to_chars(bool)` should be deleted](https://wg21.cmeerw.net/lwg/issue3266) - [Visual Studio 2017 version 15.9.0 - Visual Studio 2017 version 15.9 Release Notes](https://docs.microsoft.com/en-us/visualstudio/releasenotes/vs2017-relnotes#-c) +- [P2291R3: Add Constexpr Modifiers to Functions to_chars and from_chars for Integral Types in `` Header](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p2291r3.pdf) + - C++23での(1)constexpr指定