From patchwork Thu May 26 00:38:32 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Carlini X-Patchwork-Id: 97480 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 222D1B6F95 for ; Thu, 26 May 2011 10:38:15 +1000 (EST) Received: (qmail 23669 invoked by alias); 26 May 2011 00:38:13 -0000 Received: (qmail 23656 invoked by uid 22791); 26 May 2011 00:38:13 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from smtp209.alice.it (HELO smtp209.alice.it) (82.57.200.105) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 26 May 2011 00:37:58 +0000 Received: from [192.168.1.4] (79.51.25.12) by smtp209.alice.it (8.5.124.08) id 4D498EF309D0F6DE; Thu, 26 May 2011 02:37:57 +0200 Message-ID: <4DDDA108.4000203@oracle.com> Date: Thu, 26 May 2011 02:38:32 +0200 From: Paolo Carlini User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110414 SUSE/3.1.10 Thunderbird/3.1.10 MIME-Version: 1.0 To: "gcc-patches@gcc.gnu.org" CC: libstdc++ Subject: [v3] Use noexcept in the container adaptors X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Hi, tested x86_64-linux, committed. Paolo. ///////////////////// 2011-05-25 Paolo Carlini * include/bits/stl_queue.h: Use noexcept per the FDIS. * include/bits/stl_stack.h: Likewise. Index: include/bits/stl_queue.h =================================================================== --- include/bits/stl_queue.h (revision 174245) +++ include/bits/stl_queue.h (working copy) @@ -243,6 +243,7 @@ #ifdef __GXX_EXPERIMENTAL_CXX0X__ void swap(queue& __q) + noexcept(noexcept(swap(c, __q.c))) { using std::swap; swap(c, __q.c); @@ -312,6 +313,7 @@ template inline void swap(queue<_Tp, _Seq>& __x, queue<_Tp, _Seq>& __y) + noexcept(noexcept(__x.swap(__y))) { __x.swap(__y); } template @@ -530,6 +532,7 @@ #ifdef __GXX_EXPERIMENTAL_CXX0X__ void swap(priority_queue& __pq) + noexcept(noexcept(swap(c, __pq.c)) && noexcept(swap(comp, __pq.comp))) { using std::swap; swap(c, __pq.c); @@ -545,6 +548,7 @@ inline void swap(priority_queue<_Tp, _Sequence, _Compare>& __x, priority_queue<_Tp, _Sequence, _Compare>& __y) + noexcept(noexcept(__x.swap(__y))) { __x.swap(__y); } template inline void swap(stack<_Tp, _Seq>& __x, stack<_Tp, _Seq>& __y) + noexcept(noexcept(__x.swap(__y))) { __x.swap(__y); } template