From: Jonathan Wakely <jwakely@redhat.com>
To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] PR c++/91369 Implement P0784R7 changes to allocation and construction
Date: Thu, 24 Oct 2019 14:49:00 -0000 [thread overview]
Message-ID: <20191024143147.GU4169@redhat.com> (raw)
In-Reply-To: <20191023192708.GA981@redhat.com>
On 23/10/19 20:27 +0100, Jonathan Wakely wrote:
>--- a/libstdc++-v3/include/bits/allocator.h
>+++ b/libstdc++-v3/include/bits/allocator.h
>@@ -154,13 +154,42 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
> _GLIBCXX20_CONSTEXPR
> allocator(const allocator<_Tp1>&) _GLIBCXX_NOTHROW { }
>
>+#if __cplusplus <= 201703L
> ~allocator() _GLIBCXX_NOTHROW { }
>+#endif
This changes the value of is_trivially_destructible_v<allocator<T>> so
maybe it would be better to keep the user-provided destructor but make
it constexpr:
--- a/libstdc++-v3/include/bits/allocator.h
+++ b/libstdc++-v3/include/bits/allocator.h
@@ -154,9 +154,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_GLIBCXX20_CONSTEXPR
allocator(const allocator<_Tp1>&) _GLIBCXX_NOTHROW { }
-#if __cplusplus <= 201703L
+ _GLIBCXX20_CONSTEXPR
~allocator() _GLIBCXX_NOTHROW { }
-#endif
#if __cplusplus > 201703L
[[nodiscard,__gnu__::__always_inline__]]
With the earlier commit r277300 I've still changed the result of
is_trivially_destructible_v<allocator<void>> and
is_trivially_*_constructible_v<allocator<void>> because the
allocator<void> explicit specialization no longer exists for C++20.
That might be a bigger problem.
next prev parent reply other threads:[~2019-10-24 14:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-23 19:27 Jonathan Wakely
2019-10-24 14:49 ` Jonathan Wakely [this message]
2019-10-24 15:42 ` Jonathan Wakely
2019-10-29 9:23 ` Stephan Bergmann
2019-10-29 9:37 ` Jonathan Wakely
2019-10-29 20:16 ` Jonathan Wakely
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=20191024143147.GU4169@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).