From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16688 invoked by alias); 14 May 2014 14:41:18 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 16670 invoked by uid 89); 14 May 2014 14:41:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-lb0-f169.google.com Received: from mail-lb0-f169.google.com (HELO mail-lb0-f169.google.com) (209.85.217.169) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 14 May 2014 14:41:16 +0000 Received: by mail-lb0-f169.google.com with SMTP id s7so1497436lbd.14 for ; Wed, 14 May 2014 07:41:13 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.152.37.229 with SMTP id b5mr2628204lak.40.1400078473060; Wed, 14 May 2014 07:41:13 -0700 (PDT) Received: by 10.112.125.202 with HTTP; Wed, 14 May 2014 07:41:12 -0700 (PDT) In-Reply-To: References: <537371EF.9080901@verizon.net> <53737CF4.9090706@verizon.net> Date: Wed, 14 May 2014 14:41:00 -0000 Message-ID: Subject: Re: [PATCH, libstdc++/61166] overflow when parse number in std::duration operator"" From: Jonathan Wakely To: Ed Smith-Rowland <3dw4rd@verizon.net> Cc: =?UTF-8?Q?Daniel_Kr=C3=BCgler?= , gcc-patches , "libstdc++@gcc.gnu.org" Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2014-05/txt/msg01094.txt.bz2 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 and _Digit 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 64-bit?