From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25355 invoked by alias); 3 Aug 2015 15:56:15 -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 25337 invoked by uid 89); 3 Aug 2015 15:56:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=no 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, 03 Aug 2015 15:56:14 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id D9DD4A87; Mon, 3 Aug 2015 15:56:12 +0000 (UTC) Received: from localhost (ovpn-116-56.ams2.redhat.com [10.36.116.56]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t73FuBoR016656; Mon, 3 Aug 2015 11:56:12 -0400 Date: Mon, 03 Aug 2015 15:56:00 -0000 From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [patch] libstdc++/67078 change _N bad name in new container access functions Message-ID: <20150803155611.GQ13355@redhat.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="r7U+bLA8boMOj+mD" Content-Disposition: inline X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.5.23 (2014-03-12) X-SW-Source: 2015-08/txt/msg00093.txt.bz2 --r7U+bLA8boMOj+mD Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline Content-length: 156 We can't use _N as an identifier, as per https://gcc.gnu.org/onlinedocs/libstdc++/manual/source_code_style.html Tested ppc64le-linux, committed to trunk. --r7U+bLA8boMOj+mD Content-Type: text/x-patch; charset=us-ascii Content-Disposition: attachment; filename="patch.txt" Content-length: 1630 commit ae65b96cfb69c64d636f86d9f9154da2364e0440 Author: Jonathan Wakely Date: Mon Aug 3 16:29:44 2015 +0100 PR libstdc++/67078 * include/bits/range_access.h (size, empty, data): Fix _N bad name. diff --git a/libstdc++-v3/include/bits/range_access.h b/libstdc++-v3/include/bits/range_access.h index 2a10598..586d162 100644 --- a/libstdc++-v3/include/bits/range_access.h +++ b/libstdc++-v3/include/bits/range_access.h @@ -237,10 +237,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * @brief Return the size of an array. * @param __array Array. */ - template + template constexpr size_t - size(const _Tp (&/*__array*/)[_N]) noexcept - { return _N; } + size(const _Tp (&/*__array*/)[_Nm]) noexcept + { return _Nm; } /** * @brief Return whether a container is empty. @@ -255,9 +255,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * @brief Return whether an array is empty (always false). * @param __array Container. */ - template + template constexpr bool - empty(const _Tp (&/*__array*/)[_N]) noexcept + empty(const _Tp (&/*__array*/)[_Nm]) noexcept { return false; } /** @@ -291,9 +291,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * @brief Return the data pointer of an array. * @param __array Array. */ - template + template constexpr _Tp* - data(_Tp (&__array)[_N]) noexcept + data(_Tp (&__array)[_Nm]) noexcept { return __array; } /** --r7U+bLA8boMOj+mD--