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 [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id 3D38F385801A for ; Sat, 28 Aug 2021 09:27:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3D38F385801A Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-47-2soVLhTOPvGm8IdZT-wOTg-1; Sat, 28 Aug 2021 05:26:58 -0400 X-MC-Unique: 2soVLhTOPvGm8IdZT-wOTg-1 Received: by mail-wm1-f72.google.com with SMTP id v2-20020a7bcb420000b02902e6b108fcf1so7073703wmj.8 for ; Sat, 28 Aug 2021 02:26:58 -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=5/5g6VPZ8sK1WTh3for/Kfq56BPqdib1OK4MolKIadw=; b=ICfjkHbHpysrgSELrqRQlvStoD34xzMJKd6B4fNfcXMXYrIxohuzSdy27tHznb5T6R Hx9V1S8bcGWoDSWT/24MrowKRPyO2h1j3LmM1l0re2gGqGJmaDhJqzDuJKisSuZnsX+z 5/dswITmG7uuHKzaxQfjbDqkax5CyfNt3LC9NJRpohWcdY7cErwjrDaEIfq4nfkjRgBs 0Wz2JtaIwa8oLP1CSDsSTtI8PAXPC83qfBGnn11OuKM/oJIVYseoZyzu1LQxMa/2XAAv rYW7bktTUELGuDqksNZH3n47aPN9uhNadTQIoTU1TPeCVc+S3nPdwxxkZ6zttqJl1F/G 7bmQ== X-Gm-Message-State: AOAM532SLnbIBeYZSqQQZYD12BcDlK8iYUHrGff+0tpKDSY+S3rCu7Fi 8y8+yV215SIe/D1Og2ST41RhN3LOXJEdwwftZcBQfxFkyfYHpr//5Um0WwxZZNd0W5FwO8ySWxO yKFmLAGRdnK9ToLrZO8AZBl5oMSE3eWk= X-Received: by 2002:a1c:2310:: with SMTP id j16mr13258027wmj.185.1630142817362; Sat, 28 Aug 2021 02:26:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwL/kfTui23LfwT+N+9z1CIFXI1k/E7+1nwNu9nrhONicR94lMxYInBYlKSwXnZZ3T1eyJd6Bpqsq8+p1/HBds= X-Received: by 2002:a1c:2310:: with SMTP id j16mr13258020wmj.185.1630142817192; Sat, 28 Aug 2021 02:26:57 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jonathan Wakely Date: Sat, 28 Aug 2021 10:26:46 +0100 Message-ID: Subject: Re: [PATCH] Fix inline versioned namespace bootstrap To: =?UTF-8?Q?Fran=C3=A7ois_Dumont?= Cc: "libstdc++@gcc.gnu.org" , gcc-patches 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=-6.8 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=unavailable 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 09:27:03 -0000 On Fri, 27 Aug 2021 at 22:17, Jonathan Wakely wrote: > > 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 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 class allocator; +#if ! _GLIBCXX_INLINE_VERSION template<> class allocator; +#endif #if __cplusplus >=3D 201103L /// Declare uses_allocator so it can be specialized in `` etc. > > > > > > So I think primary _ExtPtr_allocator template should also be prefered i= n > > _GLIBCXX_INLINE_VERSION mode. > > I think it should always be preferred. The _ExtPtr_allocator > specialization is useless, it is missing the converting constructor > that would be needed to convert to/from that type to any other > _ExtPtr_allocator specialization.