public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
From: Tamar Christina <tnfchris@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org
Subject: [gcc(refs/vendors/ARM/heads/arm-struct-reorg-wip)] libstdc++: Remove redundant macro that is always empty
Date: Fri, 17 Jul 2020 12:39:04 +0000 (GMT)	[thread overview]
Message-ID: <20200717123904.A5360393FC2F@sourceware.org> (raw)

https://gcc.gnu.org/g:d1aa7705d59e56191c2ccc5594983d8fa0832718

commit d1aa7705d59e56191c2ccc5594983d8fa0832718
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Thu Feb 6 10:45:38 2020 +0000

    libstdc++: Remove redundant macro that is always empty
    
    The __iter_swap class template and explicit specialization are only
    declared (and used) for C++03 so _GLIBCXX20_CONSTEXPR does nothing here.
    
            * include/bits/stl_algobase.h (__iter_swap, __iter_swap<true>): Remove
            redundant _GLIBCXX20_CONSTEXPR.

Diff:
---
 libstdc++-v3/ChangeLog                   | 5 +++++
 libstdc++-v3/include/bits/stl_algobase.h | 6 +++---
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 76a6e2b542d..50c4dd9b84c 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,8 @@
+2020-02-06  Jonathan Wakely  <jwakely@redhat.com>
+
+	* include/bits/stl_algobase.h (__iter_swap, __iter_swap<true>): Remove
+	redundant _GLIBCXX20_CONSTEXPR.
+
 2020-02-05  Jonathan Wakely  <jwakely@redhat.com>
 
 	* include/bits/iterator_concepts.h (iter_reference_t)
diff --git a/libstdc++-v3/include/bits/stl_algobase.h b/libstdc++-v3/include/bits/stl_algobase.h
index dc922a0f3d2..efda15f816e 100644
--- a/libstdc++-v3/include/bits/stl_algobase.h
+++ b/libstdc++-v3/include/bits/stl_algobase.h
@@ -139,7 +139,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     struct __iter_swap
     {
       template<typename _ForwardIterator1, typename _ForwardIterator2>
-	_GLIBCXX20_CONSTEXPR
 	static void
 	iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b)
 	{
@@ -155,14 +154,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     struct __iter_swap<true>
     {
       template<typename _ForwardIterator1, typename _ForwardIterator2>
-	_GLIBCXX20_CONSTEXPR
 	static void
 	iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b)
 	{
 	  swap(*__a, *__b);
 	}
     };
-#endif
+#endif // C++03
 
   /**
    *  @brief Swaps the contents of two iterators.
@@ -205,6 +203,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 	&& __are_same<_ValueType2&, _ReferenceType2>::__value>::
 	iter_swap(__a, __b);
 #else
+      // _GLIBCXX_RESOLVE_LIB_DEFECTS
+      // 187. iter_swap underspecified
       swap(*__a, *__b);
 #endif
     }


                 reply	other threads:[~2020-07-17 12:39 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=20200717123904.A5360393FC2F@sourceware.org \
    --to=tnfchris@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).