public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jonathan Wakely <redi@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org
Subject: [gcc r13-3890] libstdc++: Add missing definition for <charconv> in C++14 mode
Date: Fri, 11 Nov 2022 05:29:54 +0000 (GMT)	[thread overview]
Message-ID: <20221111052954.4DEBD385AC29@sourceware.org> (raw)

https://gcc.gnu.org/g:f54ae4da1f60f4a2dea22ef184941d953442b86d

commit r13-3890-gf54ae4da1f60f4a2dea22ef184941d953442b86d
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Thu Nov 10 14:08:49 2022 +0000

    libstdc++: Add missing definition for <charconv> in C++14 mode
    
    We support <charconv> in C++14 as an extension, but that means that
    constexpr static data members are not implicitly inline. Add an
    out-of-class definition for C++14 mode.
    
    This fixes a FAIL when -std=gnu++14 is used:
    FAIL: 20_util/from_chars/1.cc (test for excess errors)
    
    libstdc++-v3/ChangeLog:
    
            * include/std/charconv (__from_chars_alnum_to_val_table::value):
            [!__cpp_inline_variables]: Add non-inline definition.

Diff:
---
 libstdc++-v3/include/std/charconv | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/libstdc++-v3/include/std/charconv b/libstdc++-v3/include/std/charconv
index 09163af7fc9..acad865f8aa 100644
--- a/libstdc++-v3/include/std/charconv
+++ b/libstdc++-v3/include/std/charconv
@@ -444,6 +444,12 @@ namespace __detail
       static constexpr type value = (_DecOnly, _S_make_table());
     };
 
+#if ! __cpp_inline_variables
+  template<bool _DecOnly>
+    const typename __from_chars_alnum_to_val_table<_DecOnly>::type
+      __from_chars_alnum_to_val_table<_DecOnly>::value;
+#endif
+
   // If _DecOnly is true: if the character is a decimal digit, then
   // return its corresponding base-10 value, otherwise return a value >= 127.
   // If _DecOnly is false: if the character is an alphanumeric digit, then

                 reply	other threads:[~2022-11-11  5:29 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20221111052954.4DEBD385AC29@sourceware.org \
    --to=redi@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    --cc=libstdc++-cvs@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).