public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [patch] libstdc++/61645 add noexcept to forward_list::splice_after
@ 2015-04-28 13:24 Jonathan Wakely
  0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2015-04-28 13:24 UTC (permalink / raw)
  To: libstdc++, gcc-patches

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

This isn't required, but we might as well add it for consistency with
std::list:splice and for extra noexceptiness.

Tested ppc64le-linux, committed to trunk.

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

commit 24308d6f00c2235fcc87ce0ab05e219696714699
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Wed Apr 8 17:35:13 2015 +0100

    	PR libstdc++/61645
    	* include/bits/forward_list.h (forward_list::splice_after): Add
    	noexcept.
    	* include/bits/forward_list.tcc (forward_list::splice_after):
    	Likewise.

diff --git a/libstdc++-v3/include/bits/forward_list.h b/libstdc++-v3/include/bits/forward_list.h
index 88eee1f..dcb696f 100644
--- a/libstdc++-v3/include/bits/forward_list.h
+++ b/libstdc++-v3/include/bits/forward_list.h
@@ -1042,14 +1042,14 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
        *  Requires this != @a x.
        */
       void
-      splice_after(const_iterator __pos, forward_list&& __list)
+      splice_after(const_iterator __pos, forward_list&& __list) noexcept
       {
 	if (!__list.empty())
 	  _M_splice_after(__pos, __list.before_begin(), __list.end());
       }
 
       void
-      splice_after(const_iterator __pos, forward_list& __list)
+      splice_after(const_iterator __pos, forward_list& __list) noexcept
       { splice_after(__pos, std::move(__list)); }
 
       /**
@@ -1064,11 +1064,11 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
        */
       void
       splice_after(const_iterator __pos, forward_list&& __list,
-                   const_iterator __i);
+                   const_iterator __i) noexcept;
 
       void
       splice_after(const_iterator __pos, forward_list& __list,
-                   const_iterator __i)
+                   const_iterator __i) noexcept
       { splice_after(__pos, std::move(__list), __i); }
 
       /**
@@ -1086,12 +1086,12 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
        */
       void
       splice_after(const_iterator __pos, forward_list&&,
-                   const_iterator __before, const_iterator __last)
+                   const_iterator __before, const_iterator __last) noexcept
       { _M_splice_after(__pos, __before, __last); }
 
       void
       splice_after(const_iterator __pos, forward_list&,
-                   const_iterator __before, const_iterator __last)
+                   const_iterator __before, const_iterator __last) noexcept
       { _M_splice_after(__pos, __before, __last); }
 
       /**
diff --git a/libstdc++-v3/include/bits/forward_list.tcc b/libstdc++-v3/include/bits/forward_list.tcc
index 00a26ed..8c85cdc 100644
--- a/libstdc++-v3/include/bits/forward_list.tcc
+++ b/libstdc++-v3/include/bits/forward_list.tcc
@@ -253,7 +253,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
     void
     forward_list<_Tp, _Alloc>::
     splice_after(const_iterator __pos, forward_list&&,
-		 const_iterator __i)
+		 const_iterator __i) noexcept
     {
       const_iterator __j = __i;
       ++__j;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-04-28 13:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-28 13:24 [patch] libstdc++/61645 add noexcept to forward_list::splice_after 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).