[Bug c++/69905] Digit separators break literal operators

aaron.mcdaid at gmail dot com gcc-bugzilla@gcc.gnu.org
Wed Oct 26 14:35:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69905

aaron.mcdaid at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aaron.mcdaid at gmail dot com

--- Comment #3 from aaron.mcdaid at gmail dot com ---
I think this could be fixed by defining the missing overload of `operator""s`
for `unsigned long long`.

As I understand it, the standard requires two overloads, `long double` and
`unsigned long long`. However, only the latter is present in gcc-6.2.0. The
`chrono` file is missing `unsigned unsigned long`, but has the following
instead:

      template <char... _Digits>
      constexpr chrono::seconds
      operator""s()
      { return __check_overflow<chrono::seconds, _Digits...>();

This appears to be failing to interpret the separator correctly.

(Apologies if I have misinterpreted, this is my first time looking in the
chrono header!)


More information about the Gcc-bugs mailing list