public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely@redhat.com>
To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: Re: [patch] Make std::string default constructor conditionally noexcept
Date: Thu, 28 May 2015 12:49:00 -0000	[thread overview]
Message-ID: <20150528123343.GN2985@redhat.com> (raw)
In-Reply-To: <20150513133629.GI30202@redhat.com>

On 13/05/15 14:36 +0100, Jonathan Wakely wrote:
>http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4383.html#2455
>
>Voted into the WP in Lenexa.
>
>We already did the right thing for vector, so only basic_string needs
>to change.
>
>Tested powerpc64le-linux, committed to trunk.

Also committed to gcc-5-branch.

>commit 634ed6e2d2ea4d69a29a8907044e6f68541d88aa
>Author: Jonathan Wakely <jwakely@redhat.com>
>Date:   Wed May 13 14:21:37 2015 +0100
>
>    	* include/bits/basic_string.h (basic_string::basic_string()): Make
>    	noexcept conditional on allocator (LWG 2455).
>
>diff --git a/libstdc++-v3/include/bits/basic_string.h b/libstdc++-v3/include/bits/basic_string.h
>index 3e3eef4..093f502 100644
>--- a/libstdc++-v3/include/bits/basic_string.h
>+++ b/libstdc++-v3/include/bits/basic_string.h
>@@ -377,7 +377,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
>       /**
>        *  @brief  Default constructor creates an empty string.
>        */
>-      basic_string() _GLIBCXX_NOEXCEPT
>+      basic_string()
>+#if __cplusplus >= 201103L
>+      noexcept(is_nothrow_default_constructible<_Alloc>::value)
>+#endif
>       : _M_dataplus(_M_local_data())
>       { _M_set_length(0); }
> 

      reply	other threads:[~2015-05-28 12:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-13 13:37 Jonathan Wakely
2015-05-28 12:49 ` Jonathan Wakely [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150528123343.GN2985@redhat.com \
    --to=jwakely@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=libstdc++@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).