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.129.124]) by sourceware.org (Postfix) with ESMTPS id 250693856DD4 for ; Wed, 5 Apr 2023 12:10:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 250693856DD4 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=1680696617; 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=Xg+jl//IwPqbMCSBkZ0VItqHEonXgNXMlJ6je3MRnksYvlsLBIJuFbNQl2YenqwBEL7uP3 gaeF5hP/v5JLn6HYDmfDkQhzb2jhBdUNEI+Hn+4Defi/pBZh1ErZLh7YmoN0+txhXyzi1f 8FESSbZ3Tz0fKSFb7b6NBFpOx2yc17M= Received: from mail-lf1-f72.google.com (mail-lf1-f72.google.com [209.85.167.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-615-LCFdM3G-MZq92v8UrHjf2g-1; Wed, 05 Apr 2023 08:10:14 -0400 X-MC-Unique: LCFdM3G-MZq92v8UrHjf2g-1 Received: by mail-lf1-f72.google.com with SMTP id k15-20020a192d0f000000b004eae6a74985so13979558lfj.11 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=BElnA/CeMqRZHvXW1nWwfnlo69Y2xn1YYwzI4poEIjsdI18HyjxDdvOO0N2YNj/UYM PIah6MirFiZpgy0HHC0cwnSuDEoxzZM5BjD0Q2FqKM29H2uTOI5lmztsIgQQQG5vIumU YhUvouiMO6IPLN41V+1bVwicEj1/08SLomNt2/q+EDEMg7aD3mVpq9x63dWnlX/Rus0D t8oyD40SnCkUb1ZHYsX/w2t3DCdpoEkxsdYv/ZhHKqZsiW9GPwLLkKs/Koi3G4TDIEHh ns/qfh37zuaPJszHMkcb0ZN+pW4BIe9Yasxai2SNXs0qIWPD0GYHlXtyDjrX1aa/nS0l k9jA== X-Gm-Message-State: AAQBX9f8VThyiD/QReucYRgeABy62hA0jl/bLoHs4IattuoJKa01512D E7gtbde92eUdyxf4hIsa5NVYZ/DH1ow5aHqm/YcOoU41wExZeaSfOqXfWBnyqrNb+JoYuXVy4t1 EMChHHYtvRuLr67M7H6fgbswabkmoQDc= X-Received: by 2002:a2e:a0c5:0:b0:298:72a8:c6c4 with SMTP id f5-20020a2ea0c5000000b0029872a8c6c4mr2145518ljm.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.1 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=unavailable 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 .