This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH, libstdc++/61166] overflow when parse number in std::duration operator""
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Daniel KrÃgler <daniel dot kruegler at gmail dot com>
- Cc: Ed Smith-Rowland <3dw4rd at verizon dot net>, gcc-patches <gcc-patches at gcc dot gnu dot org>, "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>
- Date: Wed, 14 May 2014 15:13:33 +0100
- Subject: Re: [PATCH, libstdc++/61166] overflow when parse number in std::duration operator""
- Authentication-results: sourceware.org; auth=none
- References: <537371EF dot 9080901 at verizon dot net> <CAGNvRgCXLBZ9YD+8jbJaHL9PPOdusDMWrtJgAS0_d49W3RHVJA at mail dot gmail dot com>
On 14 May 2014 14:59, Daniel KrÃgler wrote:
> 2014-05-14 15:38 GMT+02:00 Ed Smith-Rowland <firstname.lastname@example.org>:
>> Make the machinery in bits/parse_number.h unsigned long long.
>> I had actually noticed this a while back but we were in stage 4. Then I
>> forgot.. :-/
>> Built and tested on x84_64-linux.
> I understand the reason why the corresponding static members value got
> type unsigned long long, but why did the template parameter _Base also
> require the same update?
> Another question: Presumably "value" indded requires no uglification,
> but what about the member "valid"? I would expect that this is no name
> reserved by the library.
Good point. (It's a member function in at least <future>, but we
shouldn't be reserving it elsewhere).
Any time I see a static const member of integral type called value I
wonder if the type should derive from a specialization of
std::integral_constant. You could probably also do:
using __valid = true_type;