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 ESMTPS id 14E523857004 for ; Wed, 5 Apr 2023 12:10:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 14E523857004 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680696615; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aga5Il069QldUHf4GY7uGx2ff0X/Sthv/6CZc9gOU/M=; b=LOtcgoKn22gyVOT/VvynHTis/JMSvw/KJb/YaNpMCm2Ev2Q1yyfGVVzTVoZdiqqnqOnUMk sviqhVMlxH/WHFk1pm35g3oTzIwTMe4q7r9FipOvpA6qW3reOwH7Tn6tr1UnR+X9Ni32Pr QYInqeQzam4NZdfljQ5RqBubhYzv9fI= Received: from mail-lj1-f200.google.com (mail-lj1-f200.google.com [209.85.208.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-652-opwcxM7cPLaC7k1tdzxg-g-1; Wed, 05 Apr 2023 08:10:14 -0400 X-MC-Unique: opwcxM7cPLaC7k1tdzxg-g-1 Received: by mail-lj1-f200.google.com with SMTP id e15-20020a05651c038f00b002a226c2a222so7901785ljp.12 for ; Wed, 05 Apr 2023 05:10:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680696613; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aga5Il069QldUHf4GY7uGx2ff0X/Sthv/6CZc9gOU/M=; b=Ml1j5kWwMfPyJvbOFbUDuYq/WikVvv26VdIutmSIkEvpe8UPGLDEleVxlaC2tEkuT/ XuykaF8HczwIrSUBNAen+4b/mCqTViNLmYK4dG1dmbnYXw2n82xWh/fbXq2hh9VCbZAd XAx5TbUoGWBLJhASKHzsl5Z5JRjB9Gm1QNl6cHTyMOMPebXM4A+yN90Usu3K1+ZFNMk6 MQYehwU9P0ToRYBNiXCkLJnjxZ9ZItSoXPxvpp7Ilg1XmVBVmnNPG9GJThReXjD13sp7 B4AmON18vO24Dq2qgR3Qgxt4al7oa4X0/5yn030NPX3GNRJ90jQ+KW/LBWQQZI6GZ2BD jWbg== X-Gm-Message-State: AAQBX9foNFLvXsPI88M55XjqMyuYPq8aF4EVFmKq+XqeC6rDG6jvfF4G 9zA8am9ij8WWxYIU+foCFSdvKJcm3BrN5BK+xxqFx9EsAcux53sISYqaYd3Vky43hnFhaS5F2gQ dVudecFrRbYsirqMjMgiwSwHP4Kz0aGOKmAYEyzIkkA== X-Received: by 2002:a2e:a0c5:0:b0:298:72a8:c6c4 with SMTP id f5-20020a2ea0c5000000b0029872a8c6c4mr2145516ljm.9.1680696613083; Wed, 05 Apr 2023 05:10:13 -0700 (PDT) X-Google-Smtp-Source: AKy350aQI/fT1HM01X0/o2f/T0j1ph5EOou7alVlRqrfTWsiMSRSMIpptHM823W/t8qlnPsUWQ5hPW/TRhyfaQ70bR8= X-Received: by 2002:a2e:a0c5:0:b0:298:72a8:c6c4 with SMTP id f5-20020a2ea0c5000000b0029872a8c6c4mr2145511ljm.9.1680696612775; Wed, 05 Apr 2023 05:10:12 -0700 (PDT) MIME-Version: 1.0 References: <20230404230950.158556-1-arsen@aarsen.me> <86lej6a7dx.fsf@aarsen.me> In-Reply-To: From: Jonathan Wakely Date: Wed, 5 Apr 2023 13:10:01 +0100 Message-ID: Subject: Re: [PATCH 1/4] libstdc++: Harmonize and other headers To: =?UTF-8?Q?Arsen_Arsenovi=C4=87?= Cc: gcc-patches@gcc.gnu.org, 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=-12.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Wed, 5 Apr 2023 at 13:09, Jonathan Wakely wrote: > > On Wed, 5 Apr 2023 at 12:36, Arsen Arsenovi=C4=87 wrote= : > > > > > > Jonathan Wakely writes: > > > > >> [snip...] > > >>+/* Duplicate definition with unique_ptr.h. */ > > >>+#if __cplusplus > 202002L && defined(__cpp_constexpr_dynamic_alloc) > > >>+# define __cpp_lib_constexpr_memory 202202L > > >>+#elif __cplusplus > 201703L > > >>+# include > > > > > > Including is unrelated to the FTM, and should always be > > > done for >=3D C++17, but this change means it's not included for the > > > first block. > > > > > > Please leave the #include with the _Safe_iterator_base declaration. > > > > Fixed: > > > > diff --git a/libstdc++-v3/include/bits/ptr_traits.h b/libstdc++-v3/incl= ude/bits/ptr_traits.h > > index dc42a743c96..8a919ec1090 100644 > > --- a/libstdc++-v3/include/bits/ptr_traits.h > > +++ b/libstdc++-v3/include/bits/ptr_traits.h > > @@ -34,12 +34,15 @@ > > > > #include > > > > +/* Duplicate definition with unique_ptr.h. */ > > +#if __cplusplus > 202002L && defined(__cpp_constexpr_dynamic_alloc) > > +# define __cpp_lib_constexpr_memory 202202L > > +#elif __cplusplus > 201703L > > +# define __cpp_lib_constexpr_memory 201811L > > +#endif > > + > > #if __cplusplus > 201703L > > #include > > -# ifndef __cpp_lib_constexpr_memory > > -// Defined to a newer value in bits/unique_ptr.h for C++23 > > -# define __cpp_lib_constexpr_memory 201811L > > -# endif > > namespace __gnu_debug { struct _Safe_iterator_base; } > > #endif > > > > >> [snip...] > > > > > > Pleae keep them in alphabetical order (within their relevant > > > blocks/groups). > > > > I didn't even notice the ordering - apologies. > > > > Updated patch: > > > > > > The testsuite is running on my end, so the above is technically not > > tested yet, but it should be the same logic unless I reordered somethin= g > > wrong. > > OK for trunk, thanks Oops, I meant to say OK if testing passes, obviously. > > I note that this moves __cpp_lib_to_chars from being defined for C++17 > to being defined for C++14. That's OK, because it's actually true for > libstdc++ as noted by the comment at the top of .