From: Jeff Garland (azswdude_at_[hidden])
Date: 2023-03-08 14:52:51


On Tue, Mar 7, 2023 at 11:14 AM John Maddock via Boost <
boost_at_[hidden]> wrote:

>
> > Please see: https://en.cppreference.com/w/cpp/feature_test for language
> > level macros -- look for _cpp_constexpr. I believe you'll discover that
> > every combination you're looking for going back to cxx 2011 is
> represented
> > -- basically making a boost config macro extraneous. The standard copied
> > this idea from boost.config btw and it's quite powerful for portable
> > libraries. Note that I regret using the boost.config macro for date-time
> > constexpr stuff, because at this point I'd like to make the library
> > available in a stand-alone fashion like boost.math. Not depending on
> > boost.config would be helpful in that endeavor.
>
> I think that would be fairly trivial Jeff: I see nothing in date_time
> that requires something beyond C++11, so you could probably just check
> for Boost.Config's presence with __has_include and only include it when
> available. Otherwise assume a conforming C++11 compiler in standalone
> mode.
>
> Thanks John. date-time is currently compatible back to 1998 currently.
The constexpr macros from config allow that to happen by removing constexpr
when less than c++14 (the limitations of c++11 constexpr were too much to
practically support it). But yeah, I agree requiring 14 (and maybe 17 for
from_chars support) or above should make standalone date-time relatively
easy. I'd actually just like to remove as much of the macro hackery once
and for all.

Jeff