public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jonathan Wakely <redi@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org
Subject: [gcc r13-114] libstdc++: Add always_inline to the simplest std::array accessors [PR104719]
Date: Wed,  4 May 2022 15:34:47 +0000 (GMT)	[thread overview]
Message-ID: <20220504153447.CA6B338485A5@sourceware.org> (raw)

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; }


                 reply	other threads:[~2022-05-04 15:34 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=20220504153447.CA6B338485A5@sourceware.org \
    --to=redi@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    --cc=libstdc++-cvs@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).