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.
This commit is contained in:
parent
56d2222c58
commit
f54ae4da1f
1 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue