From patchwork Wed May 13 12:25:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 471850 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 150DC140662 for ; Wed, 13 May 2015 22:26:08 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=Tox1NtoM; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=foU/ipoq3g2VIrfiosAVoxoqhweICMMY1i7niWTb6M/0V9MfrXZ/2 apcON7ChEOJWZ1C+I/+iRG8XDe9JxG2tnu7jkDBJ66c0Xn/HvhwB6rBAfq6sSLpd QDy1UOB+dZbUxPbFkfQxzOEYgdd+OtFO/yWMQd2sgRGmqtF/uYdZ7I= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=56LUzKVI6TECLZCsvURbNvGJ75o=; b=Tox1NtoMjnqgM4Z3UJW8 Re8szH+WyAm/LFaklTW0gBpzTfSa4o5mygY6jc7e0DmsCUDJwluCb5qkwXmveG3U UujEsvaYWuxk5sdzv27C2Ffr4zG+xcLr34N8XeElnEwC3DVEvY4m5xclMGLRTDDe srTKfFGuX1BUNZF24X26wUo= Received: (qmail 6430 invoked by alias); 13 May 2015 12:25:49 -0000 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 Received: (qmail 6411 invoked by uid 89); 13 May 2015 12:25:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 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; Wed, 13 May 2015 12:25:46 +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 (Postfix) with ESMTPS id 49BEAAC7DC; Wed, 13 May 2015 12:25:45 +0000 (UTC) Received: from localhost (ovpn-116-139.ams2.redhat.com [10.36.116.139]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t4DCPiVZ001813; Wed, 13 May 2015 08:25:44 -0400 Date: Wed, 13 May 2015 13:25:43 +0100 From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [patch] LWG 2440 std::seed_seq::size() should be noexcept Message-ID: <20150513122543.GF30202@redhat.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4383.html#2440 This was resolved as a defect and voted into the working paper in Lenexa. As an extension we can also make the default constructor noexcept. Tested powerpc64le-linux, committed to trunk. commit 1629bfd40e615b5130d72d9759ca82cfca8f74d2 Author: Jonathan Wakely Date: Wed May 13 13:13:37 2015 +0100 * include/bits/random.h (seed_seq): More noexcept (LWG 2440). diff --git a/libstdc++-v3/include/bits/random.h b/libstdc++-v3/include/bits/random.h index 501243d..5905e60 100644 --- a/libstdc++-v3/include/bits/random.h +++ b/libstdc++-v3/include/bits/random.h @@ -6023,13 +6023,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION */ class seed_seq { - public: /** The type of the seed vales. */ typedef uint_least32_t result_type; /** Default constructor. */ - seed_seq() + seed_seq() noexcept : _M_v() { } @@ -6045,7 +6044,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION generate(_RandomAccessIterator __begin, _RandomAccessIterator __end); // property functions - size_t size() const + size_t size() const noexcept { return _M_v.size(); } template @@ -6058,7 +6057,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION seed_seq& operator=(const seed_seq&) = delete; private: - /// std::vector _M_v; };