From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 110157 invoked by alias); 28 Apr 2015 13:05:47 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 110139 invoked by uid 89); 28 Apr 2015 13:05:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 28 Apr 2015 13:05:40 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t3SD5dGC010389 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 28 Apr 2015 09:05:39 -0400 Received: from localhost (ovpn-116-62.ams2.redhat.com [10.36.116.62]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t3SD5cnq004686; Tue, 28 Apr 2015 09:05:38 -0400 Date: Tue, 28 Apr 2015 13:24:00 -0000 From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [patch] libstdc++/61645 add noexcept to forward_list::splice_after Message-ID: <20150428130538.GZ3618@redhat.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="vs0rQTeTompTJjtd" Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-SW-Source: 2015-04/txt/msg01737.txt.bz2 --vs0rQTeTompTJjtd Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline Content-length: 159 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. --vs0rQTeTompTJjtd Content-Type: text/x-patch; charset=us-ascii Content-Disposition: attachment; filename="patch.txt" Content-length: 2708 commit 24308d6f00c2235fcc87ce0ab05e219696714699 Author: Jonathan Wakely 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; --vs0rQTeTompTJjtd--