public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely@redhat.com>
To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: [patch] libstdc++/67078 change _N bad name in new container access functions
Date: Mon, 03 Aug 2015 15:56:00 -0000	[thread overview]
Message-ID: <20150803155611.GQ13355@redhat.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 156 bytes --]

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.


[-- Attachment #2: patch.txt --]
[-- Type: text/x-patch, Size: 1630 bytes --]

commit ae65b96cfb69c64d636f86d9f9154da2364e0440
Author: Jonathan Wakely <jwakely@redhat.com>
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 <typename _Tp, size_t _N>
+  template <typename _Tp, size_t _Nm>
     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 <typename _Tp, size_t _N>
+  template <typename _Tp, size_t _Nm>
     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 <typename _Tp, size_t _N>
+  template <typename _Tp, size_t _Nm>
     constexpr _Tp*
-    data(_Tp (&__array)[_N]) noexcept
+    data(_Tp (&__array)[_Nm]) noexcept
     { return __array; }
 
   /**

                 reply	other threads:[~2015-08-03 15:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150803155611.GQ13355@redhat.com \
    --to=jwakely@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=libstdc++@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).