[Bug libstdc++/84671] [6/7/8 Regression] Chrono literals don't accept apostrophe as separator
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Mar 2 12:52:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84671
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC|jwakely.gcc at gmail dot com |
Host|Linux x86 64-bit |
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Testing this fix:
--- a/libstdc++-v3/include/bits/parse_numbers.h
+++ b/libstdc++-v3/include/bits/parse_numbers.h
@@ -197,6 +197,13 @@ namespace __parse_int
"integer literal does not fit in unsigned long long");
};
+ // Skip past digit separators:
+ template<unsigned _Base, unsigned long long _Pow, char _Dig, char..._Digs>
+ struct _Number_help<_Base, _Pow, '\'', _Dig, _Digs...>
+ : _Number_help<_Base, _Pow, _Dig, _Digs...>
+ { };
+
+ // Terminating case:
template<unsigned _Base, unsigned long long _Pow, char _Dig>
struct _Number_help<_Base, _Pow, _Dig>
{
More information about the Gcc-bugs
mailing list