From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id AB07D3858435 for ; Sat, 28 Aug 2021 13:38:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AB07D3858435 Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-302-I7nQ0kjkNLaCtPmaZFmFfg-1; Sat, 28 Aug 2021 09:38:39 -0400 X-MC-Unique: I7nQ0kjkNLaCtPmaZFmFfg-1 Received: by mail-wm1-f70.google.com with SMTP id w25-20020a1cf6190000b0290252505ddd56so3033138wmc.3 for ; Sat, 28 Aug 2021 06:38:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=as5U5DfLH0/Zm44J1qcHayxg06Ay5BkQVcuaofUAo9Q=; b=XikSiMusV9jFBTyJZKatubN/rlfcDfLsnc0YrjhqIedcYsX5fl4jB+WSNntgGM2ord 7L60qtSiRMhgAtLiY7KWQ8YY8mR+wcTWGQCwMxZbhhwrOHhkq6TcSHyz3TcCMRWNvHog ETfUxXkzdrE2EU9ZL5yAWrqWlVABQe0TBWeH4VwgEqNR9vVGKP7AvY6tYmjiAbgxzvb2 hGkFxXsQ++eBXCOe+CyC4Ny0q1Z0x1ggfPNnYtK7OjpYWQt+MPlh8H3+naWFo1+D0mSd Dpj29m/ylmauWkrf8kO2ZdMKTFa9WA2+kEaNA8VqKq66e0o/7UmSKg+YrqKLvkZKc4ZO iaKQ== X-Gm-Message-State: AOAM532pjojX9F6JLtW2KyDKZfe/il9C1gMPN8tUuZoR7od1unj9KLoi +5TKnYS9fa8eAJCdq4AG3ZsvCo7NISd4Lh8slKwjFHMBMn48jHavJKu/8dBGWGkPACOVJPqzSN2 ixvphHXgqCAfsu2e56uvjqx1KnWMcuAA= X-Received: by 2002:adf:e901:: with SMTP id f1mr16172593wrm.13.1630157918706; Sat, 28 Aug 2021 06:38:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyESZxtmoxGTMnG3f/RqeSi+q1yfMFDDsXdzVq5OpskylbLt20eEEpl9GJeyekT1F38ANi6+6p9gON0qPKUl4E= X-Received: by 2002:adf:e901:: with SMTP id f1mr16172582wrm.13.1630157918491; Sat, 28 Aug 2021 06:38:38 -0700 (PDT) MIME-Version: 1.0 References: <7085cd0a-c765-7971-ef81-0db8fe7f13fd@gmail.com> In-Reply-To: <7085cd0a-c765-7971-ef81-0db8fe7f13fd@gmail.com> From: Jonathan Wakely Date: Sat, 28 Aug 2021 14:38:27 +0100 Message-ID: Subject: Re: [PATCH] Fix inline versioned namespace bootstrap To: =?UTF-8?Q?Fran=C3=A7ois_Dumont?= Cc: "libstdc++@gcc.gnu.org" X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Aug 2021 13:38:42 -0000 On Sat, 28 Aug 2021 at 13:40, Fran=C3=A7ois Dumont w= rote: > > On 28/08/21 12:49 pm, Jonathan Wakely wrote: > > On Sat, 28 Aug 2021 at 10:26, Jonathan Wakely wrot= e: > >> On Fri, 27 Aug 2021 at 22:17, Jonathan Wakely wro= te: > >>> On Fri, 27 Aug 2021 at 21:58, Fran=C3=A7ois Dumont via Libstdc++ > >>> wrote: > >>>> Since std::allocator is not specialized anymore in > >>>> _GLIBCXX_INLINE_VERSION mode _ExtPtr_allocator specialization = do > >>>> not compile > >>>> > >>>> because std::allocator is incomplete. > >>> That doesn't look right ... it should be complete. This suggests ther= e > >>> 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 > >> class allocator; > >> > >> +#if ! _GLIBCXX_INLINE_VERSION > >> template<> > >> class allocator; > >> +#endif > >> > >> #if __cplusplus >=3D 201103L > >> /// Declare uses_allocator so it can be specialized in `` et= c. > > > > Actually, the allocator 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. > > > Ok, there's no rush. I've pushed the fix now. > > Note that I noticed that because I am working on PR 83077 to allow sso > string in versioned namespace. > > My plan is to make the sso string the only std::string implementation in > versioned namespace. Great, thanks. > > Now that I saw your RFC about dropping C++98 support for versioned > namespace I think my approach fall into this. But I also think that this > RFC will be approved so it should be fine unless you have another concern= . > > Fran=C3=A7ois >