[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: nullptr in C++ mode on macOS
From: |
Paul Eggert |
Subject: |
Re: nullptr in C++ mode on macOS |
Date: |
Thu, 9 Feb 2023 17:20:40 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 |
On 2/9/23 11:31, Bruno Haible wrote:
* If we '#define nullptr __null' again after including the header files,
it will be usable with varargs, but will
- violate the requirement that nullptr is an instance of nullptr_t,
- and thus open up problems with overloading again.
I don't know how to proceed here.
Let's treat C++ overloading like we already treat C _Generic, that is,
as a documented limitation of the substitute nullptr macro. This should
be good enough for Gnulib itself. I installed the attached to document
that, and to work around the Apple clang 14 incompatibility with it in mind.
On 2/9/23 12:08, Arsen Arsenović wrote:
It's, to my awareness, not possible to correctly and portably implement
nullptr in-language.
Yes, but all that's needed here is to implement Gnulib's limited
substitute well enough to work with Apple clang 14 and any other
compilers that have similar incompatibilities with current C++. I hope
the attached patch does that, though I'm by no means a C++ whiz.
0001-nullptr-work-around-Apple-clang-14-issue.patch
Description: Text Data