aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2015-04-28 14:05:33 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2015-04-28 14:05:33 +0100
commit956d18149eb636d0dd5987c7020873314a869a98 (patch)
tree75961f8078abcc30be02a9065b4e47683dd8473d
parentd747ee05e36de80e530ad7d361750bba5c890342 (diff)
downloadgcc-956d18149eb636d0dd5987c7020873314a869a98.zip
gcc-956d18149eb636d0dd5987c7020873314a869a98.tar.gz
gcc-956d18149eb636d0dd5987c7020873314a869a98.tar.bz2
re PR libstdc++/61645 (forward_list::splice_after shall not throw exceptions)
PR libstdc++/61645 * include/bits/forward_list.h (forward_list::splice_after): Add noexcept. * include/bits/forward_list.tcc (forward_list::splice_after): Likewise. From-SVN: r222525
-rw-r--r--libstdc++-v3/ChangeLog6
-rw-r--r--libstdc++-v3/include/bits/forward_list.h12
-rw-r--r--libstdc++-v3/include/bits/forward_list.tcc2
3 files changed, 13 insertions, 7 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index c0f2924..e3242e8 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,5 +1,11 @@
2015-04-28 Jonathan Wakely <jwakely@redhat.com>
+ PR libstdc++/61645
+ * include/bits/forward_list.h (forward_list::splice_after): Add
+ noexcept.
+ * include/bits/forward_list.tcc (forward_list::splice_after):
+ Likewise.
+
PR libstdc++/65631
* include/bits/random.h (seed_seq) Define copy constructor and copy
assignment as deleted.
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;