public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-3890] libstdc++: Add missing definition for <charconv> in C++14 mode
@ 2022-11-11 5:29 Jonathan Wakely
0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2022-11-11 5:29 UTC (permalink / raw)
To: gcc-cvs, libstdc++-cvs
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-11-11 5:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-11 5:29 [gcc r13-3890] libstdc++: Add missing definition for <charconv> in C++14 mode Jonathan Wakely
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).