Boost logo

Boost :

From: John Maddock (jz.maddock_at_[hidden])
Date: 2023-02-20 13:11:44


On 19/02/2023 22:27, Gero Peterhoff via Boost wrote:
> Hi,
> for more compatibility with existing boost-macros/defines I came up
> with - see attachment.
> 1) Is that correct in principle?

These are best dealt with via PR's on Github - preferable one macro at a
time and with test cases.

See
https://www.boost.org/doc/libs/1_81_0/libs/config/doc/html/boost_config/guidelines_for_boost_authors.html#boost_config.guidelines_for_boost_authors.adding_new_defect_macros

For BOOST_CXXNN_CONSTEXPR: yes there are constexpr updates for each of
the last few standards, but I'm having a hard time seeing what the
benefit of these macros are over checking __cpp_constexpr directly?

BTW we generally only add new macros at the request of an existing boost
library.

> 2) Problem: for BOOST_NO_CXX23_HDR_XXX I use __has_include. However,
> __has_include is not guaranteed to exist. How about the solution?

We deal with this like this:
https://github.com/boostorg/config/blob/ab271393a7f9321d34ca641cc2b042aa081721b9/include/boost/config/detail/suffix.hpp#L1200

It's not trivial, and I would like to have a (released) C++23 compiler
to test with before committing to this.

John.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk