Skip to content

Commit

Permalink
charconv: P2291R3 to_chars/from_chars constexpr指定(#1086)
Browse files Browse the repository at this point in the history
  • Loading branch information
yohhoy committed Jan 19, 2023
1 parent ccc68e9 commit 333f723
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion reference/charconv/from_chars.md
Expand Up @@ -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,
Expand Down Expand Up @@ -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 `<charconv>` Header](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p2291r3.pdf)
- C++23での(1)constexpr指定
6 changes: 5 additions & 1 deletion reference/charconv/to_chars.md
Expand Up @@ -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

Expand Down Expand Up @@ -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 `<charconv>` Header](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p2291r3.pdf)
- C++23での(1)constexpr指定

0 comments on commit 333f723

Please sign in to comment.