* [patch] libstdc++/67078 change _N bad name in new container access functions
@ 2015-08-03 15:56 Jonathan Wakely
0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2015-08-03 15:56 UTC (permalink / raw)
To: libstdc++, gcc-patches
[-- 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; }
/**
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-08-03 15:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-03 15:56 [patch] libstdc++/67078 change _N bad name in new container access functions Jonathan Wakely
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).