public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely@redhat.com>
To: Jonathan Wakely <jwakely@redhat.com>
Cc: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: Re: [committed] libstdc++: Implement constexpr std::to_chars for C++23 (P2291R3)
Date: Mon, 17 Oct 2022 09:48:41 +0100	[thread overview]
Message-ID: <CACb0b4m1GCkTQmo55Y98_3LfU0Lik5LAfMm-jbdTm6aA3EohLw@mail.gmail.com> (raw)
In-Reply-To: <20221015202518.2687700-1-jwakely@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 427 bytes --]

On Sat, 15 Oct 2022 at 21:26, Jonathan Wakely via Libstdc++
<libstdc++@gcc.gnu.org> wrote:
>
> libstdc++-v3/ChangeLog:
>
>         * include/bits/charconv.h (__to_chars_10_impl): Add constexpr
>         for C++23. Remove 'static' from array.
>         * include/std/charconv (__cpp_lib_constexpr_charconv): Define.

I managed to define the feature test macro with the wrong value. Fixed
by the attached patch, pushed to trunk.

[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 2622 bytes --]

commit 0f4815502d8dac07579dc7a5a40c597a18291b4c
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Mon Oct 17 09:38:02 2022

    libstdc++: Fix value of __cpp_lib_constexpr_charconv
    
    libstdc++-v3/ChangeLog:
    
            * include/std/charconv (__cpp_lib_constexpr_charconv): Define to
            correct value.
            * include/std/version (__cpp_lib_constexpr_charconv): Likewise.
            * testsuite/20_util/to_chars/constexpr.cc: Check correct value.
            * testsuite/20_util/to_chars/version.cc: Likewise.

diff --git a/libstdc++-v3/include/std/charconv b/libstdc++-v3/include/std/charconv
index 4b6cc83a567..7aefdd3298c 100644
--- a/libstdc++-v3/include/std/charconv
+++ b/libstdc++-v3/include/std/charconv
@@ -51,7 +51,7 @@
 #endif
 
 #if __cplusplus > 202002L
-# define __cpp_lib_constexpr_charconv 202202L
+# define __cpp_lib_constexpr_charconv 202207L
 #endif
 
 namespace std _GLIBCXX_VISIBILITY(default)
diff --git a/libstdc++-v3/include/std/version b/libstdc++-v3/include/std/version
index bec9e7aa792..3c7c440bd80 100644
--- a/libstdc++-v3/include/std/version
+++ b/libstdc++-v3/include/std/version
@@ -302,7 +302,7 @@
 #if __cplusplus > 202002L
 // c++23
 #define __cpp_lib_byteswap 202110L
-#define __cpp_lib_constexpr_charconv 202202L
+#define __cpp_lib_constexpr_charconv 202207L
 #define __cpp_lib_constexpr_typeinfo 202106L
 #if __cpp_concepts >= 202002L
 # define __cpp_lib_expected 202202L
diff --git a/libstdc++-v3/testsuite/20_util/to_chars/constexpr.cc b/libstdc++-v3/testsuite/20_util/to_chars/constexpr.cc
index 30c591659ee..10855b737c7 100644
--- a/libstdc++-v3/testsuite/20_util/to_chars/constexpr.cc
+++ b/libstdc++-v3/testsuite/20_util/to_chars/constexpr.cc
@@ -5,7 +5,7 @@
 
 #ifndef __cpp_lib_constexpr_charconv
 # error "Feature-test macro for constexpr charconv missing in <charconv>"
-#elif __cpp_lib_constexpr_charconv != 202202L
+#elif __cpp_lib_constexpr_charconv != 202207L
 # error "Feature-test macro for constexpr charconv has wrong value in <charconv>"
 #endif
 
diff --git a/libstdc++-v3/testsuite/20_util/to_chars/version.cc b/libstdc++-v3/testsuite/20_util/to_chars/version.cc
index af06e1bf054..25b1e0036e8 100644
--- a/libstdc++-v3/testsuite/20_util/to_chars/version.cc
+++ b/libstdc++-v3/testsuite/20_util/to_chars/version.cc
@@ -11,6 +11,6 @@
 
 #ifndef __cpp_lib_constexpr_charconv
 # error "Feature-test macro for constexpr charconv missing in <version>"
-#elif __cpp_lib_constexpr_charconv != 202202L
+#elif __cpp_lib_constexpr_charconv != 202207L
 # error "Feature-test macro for constexpr charconv has wrong value in <version>"
 #endif

      reply	other threads:[~2022-10-17  8:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-15 20:25 Jonathan Wakely
2022-10-17  8:48 ` Jonathan Wakely [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACb0b4m1GCkTQmo55Y98_3LfU0Lik5LAfMm-jbdTm6aA3EohLw@mail.gmail.com \
    --to=jwakely@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=libstdc++@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).