C++ Logo

sg10

Advanced search

Re: [isocpp-lib] Feature-test macro collision

From: Barry Revzin <barry.revzin_at_[hidden]>
Date: Thu, 1 Sep 2022 15:07:32 -0500
On Thu, Sep 1, 2022, 2:33 PM Mark de Wever <koraq_at_[hidden]> wrote:

> On Thu, Sep 01, 2022 at 02:14:11PM -0500, Barry Revzin wrote:
> > On Thu, Sep 1, 2022, 1:30 PM Mark de Wever <koraq_at_[hidden]> wrote:
> >
> > > Sorry for the late reply, but I wasn't subscribed to this mailing list
> > > and I wasn't aware there were proposed changes for fix the feature-test
> > > macro conflicts introduced during the last plenary.
> > >
> > > For libc++ combining the feature-test macros for these two papers isn't
> > > great:
> > > P2508R1 "Expose std::basic-format-string<charT, Args...>"
> > > P2419R2 "Clarify handling of encodings in localized formatting of
> chrono
> > > types"
> > >
> > > P2508R1 is included in libc++15 which should ship this month. (The only
> > > part I haven't implemented for that paper is the feature-test macro.)
> > >
> > > I have started to work on the chrono formatters in libc++ but it will
> > > take some time before it will be done. Especially since libc++ still
> > > misses parts of C++20 chono: timezones, leapseconds, and some clocks.
> > > So it will take some time before I have a look at P2419R2.
> > >
> > > I propose to use two separate macros to resolve the conflicts between
> > > these two papers:
> > > P2508R1 __cpp_lib_format with the value 202207
> > > P2419R2 __cpp_lib_format_chrono with the value 202207
> > >
> > > Combining the two formatting ranges papers in __cpp_lib_format_ranges
> > > sounds good to me.
> >
> > But all the chrono formatting is already included in __cpp_lib_format (by
> > way of P1361). If libc++ doesn't support that yet, you can't bump that
> > macro anyway?
>
> I had a look at P1361 before and I just looked again, but it I don't see
> a feature-test macro. (I already had that on a list of notes I have for
> that paper.)
>
> Regards,
> Mark
>

https://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations#__cpp_lib_format

I don't remember when/where this was discussed, but it's there.

Barry

Received on 2022-09-01 20:07:44