This is the mail archive of the
mailing list for the libstdc++ project.
Re: [PATCH, libstdc++/61166] overflow when parse number in std::duration operator""
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Ed Smith-Rowland <3dw4rd at verizon dot net>
- Cc: Daniel KrÃgler <daniel dot kruegler at gmail dot com>, 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:41:12 +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> <53737CF4 dot 9090706 at verizon dot net> <CAH6eHdSF8NXfz328nqoS4edVNyEQLCGdiUDGzSt7=T_gQ6Jm+A at mail dot gmail dot com>
On 14 May 2014 15:36, Jonathan Wakely wrote:
> On 14 May 2014 15:25, Ed Smith-Rowland wrote:
>> But in keeping with, say, our extension type traits and such maybe i should
>> uglify value as well.
> No, just derive from std::integral_constant and you get value "for free".
> You already use integral_constant in that file, so the name "value" is
> already used.
That also has the advantage that _Digit<B, 'f'> and _Digit<B, 'F'>
share the same base class, so you don't end up with two different
static members with the same value (and if you make __valid a typedef
as I suggested you don't have any static members for that either).
Do we really need _Digit::value to be unsigned long long, or is it
only the results in _Power_help and _Number_help that need to be