public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely@redhat.com>
To: "François Dumont" <frs.dumont@gmail.com>
Cc: "libstdc++@gcc.gnu.org" <libstdc++@gcc.gnu.org>,
	gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Fix inline versioned namespace bootstrap
Date: Sat, 28 Aug 2021 11:49:57 +0100	[thread overview]
Message-ID: <CACb0b4k=oiqg7Zz+nNcZ4OxFkJS6qJygtWGibppHy0UNmzDJWg@mail.gmail.com> (raw)
In-Reply-To: <CACb0b4k2LrPaesMLB3qievpfh0MNOCUpJfLWgJuVxZ8WXrz9kw@mail.gmail.com>

On Sat, 28 Aug 2021 at 10:26, Jonathan Wakely <jwakely@redhat.com> wrote:
>
> On Fri, 27 Aug 2021 at 22:17, Jonathan Wakely <jwakely@redhat.com> wrote:
> >
> > On Fri, 27 Aug 2021 at 21:58, François Dumont via Libstdc++
> > <libstdc++@gcc.gnu.org> wrote:
> > >
> > > Since std::allocator<void> is not specialized anymore in
> > > _GLIBCXX_INLINE_VERSION mode _ExtPtr_allocator<void> specialization do
> > > not compile
> > >
> > > because std::allocator<void> is incomplete.
> >
> > That doesn't look right ... it should be complete. This suggests there
> > is a deeper problem, which I'll look into.
>
> This is the correct fix:
>
> --- a/libstdc++-v3/include/bits/memoryfwd.h
> +++ b/libstdc++-v3/include/bits/memoryfwd.h
> @@ -63,8 +63,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
>   template<typename>
>     class allocator;
>
> +#if ! _GLIBCXX_INLINE_VERSION
>   template<>
>     class allocator<void>;
> +#endif
>
> #if __cplusplus >= 201103L
>   /// Declare uses_allocator so it can be specialized in `<queue>` etc.


Actually, the allocator<void> specialization is still needed for
pre-C++20 with the versioned namespace, and that means there's the
same trivial default ctor ABI concern for the versioned namespace. I'm
testing a fix now, but it might not be committed until I'm back at
work on Tuesday.


  reply	other threads:[~2021-08-28 10:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-27 20:57 François Dumont
2021-08-27 21:17 ` Jonathan Wakely
2021-08-28  9:26   ` Jonathan Wakely
2021-08-28 10:49     ` Jonathan Wakely [this message]
2021-08-28 12:40       ` François Dumont
2021-08-28 13:38         ` 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='CACb0b4k=oiqg7Zz+nNcZ4OxFkJS6qJygtWGibppHy0UNmzDJWg@mail.gmail.com' \
    --to=jwakely@redhat.com \
    --cc=frs.dumont@gmail.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).