From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id 4DEBD385AC29; Fri, 11 Nov 2022 05:29:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4DEBD385AC29 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1668144594; bh=/lL2lzJMSEACrkzZgiE4r1AdN272tmZa5PX/zdEGAF0=; h=From:To:Subject:Date:From; b=Strif7DcA66WUJEXFQE7+OyFYGsbnrMIlhR9NSPHV0KaNhZiZtWEthucHu0X/8f/I HuU0ayxf9T9FaoCRvMM3x+C+HOS5FuqhxnzigTYxVlQR4zMu302f1pWs/fuzQri5q2 AB4ZBS/5APc6rShuwTaZ7+ybCviz6aywT4vlkP5Y= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jonathan Wakely To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r13-3890] libstdc++: Add missing definition for in C++14 mode X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/master X-Git-Oldrev: 56d2222c58be78d5125bd8a1069364f0f4b2baa2 X-Git-Newrev: f54ae4da1f60f4a2dea22ef184941d953442b86d Message-Id: <20221111052954.4DEBD385AC29@sourceware.org> Date: Fri, 11 Nov 2022 05:29:54 +0000 (GMT) List-Id: https://gcc.gnu.org/g:f54ae4da1f60f4a2dea22ef184941d953442b86d commit r13-3890-gf54ae4da1f60f4a2dea22ef184941d953442b86d Author: Jonathan Wakely Date: Thu Nov 10 14:08:49 2022 +0000 libstdc++: Add missing definition for in C++14 mode We support 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 + 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