From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 110757 invoked by alias); 27 Apr 2015 11:32:01 -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 110736 invoked by uid 89); 27 Apr 2015 11:32:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 27 Apr 2015 11:31:58 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 8EFED8E778; Mon, 27 Apr 2015 11:31:57 +0000 (UTC) Received: from localhost (ovpn-116-62.ams2.redhat.com [10.36.116.62]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t3RBVuWV026654; Mon, 27 Apr 2015 07:31:56 -0400 Date: Mon, 27 Apr 2015 11:32:00 -0000 From: Jonathan Wakely To: =?iso-8859-1?Q?Fran=E7ois?= Dumont Cc: "libstdc++@gcc.gnu.org" , gcc-patches Subject: Re: Hide _S_n_primes from user code Message-ID: <20150427113155.GF3618@redhat.com> References: <5537F904.4010405@gmail.com> <55380079.3000105@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <55380079.3000105@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SW-Source: 2015-04/txt/msg01604.txt.bz2 On 22/04/15 22:11 +0200, François Dumont wrote: >+ constexpr auto __n_primes >+ = sizeof(__prime_list) / sizeof(unsigned long) - 1; Normally I'd say sizeof(__prime_list) / sizeof(*__prime_list) - 1 would be better, but since it's very unlikely we'll change the element type in the array what you have should be safe. OK for trunk.