public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-114] libstdc++: Add always_inline to the simplest std::array accessors [PR104719]
@ 2022-05-04 15:34 Jonathan Wakely
0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2022-05-04 15:34 UTC (permalink / raw)
To: gcc-cvs, libstdc++-cvs
https://gcc.gnu.org/g:22399ad6edcd4a2903b05196b59eec3159ceaa38
commit r13-114-g22399ad6edcd4a2903b05196b59eec3159ceaa38
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Wed Apr 27 16:09:06 2022 +0100
libstdc++: Add always_inline to the simplest std::array accessors [PR104719]
libstdc++-v3/ChangeLog:
PR libstdc++/104719
* include/std/array (array::size(), array::max_size())
(array::empty(), array::data()): Add always_inline attribute.
Diff:
---
libstdc++-v3/include/std/array | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/libstdc++-v3/include/std/array b/libstdc++-v3/include/std/array
index d1daffee425..7ba92d0e90d 100644
--- a/libstdc++-v3/include/std/array
+++ b/libstdc++-v3/include/std/array
@@ -182,15 +182,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ return const_reverse_iterator(begin()); }
// Capacity.
- [[__gnu__::__const__, __nodiscard__]]
+ [[__nodiscard__, __gnu__::__const__, __gnu__::__always_inline__]]
constexpr size_type
size() const noexcept { return _Nm; }
- [[__gnu__::__const__, __nodiscard__]]
+ [[__nodiscard__, __gnu__::__const__, __gnu__::__always_inline__]]
constexpr size_type
max_size() const noexcept { return _Nm; }
- [[__gnu__::__const__, __nodiscard__]]
+ [[__nodiscard__, __gnu__::__const__, __gnu__::__always_inline__]]
constexpr bool
empty() const noexcept { return size() == 0; }
@@ -271,7 +271,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
return _M_elems[_Nm - 1];
}
- [[__gnu__::__const__, __nodiscard__]]
+ [[__nodiscard__, __gnu__::__const__, __gnu__::__always_inline__]]
_GLIBCXX17_CONSTEXPR pointer
data() noexcept
{ return _M_elems; }
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-05-04 15:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-04 15:34 [gcc r13-114] libstdc++: Add always_inline to the simplest std::array accessors [PR104719] 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).