Boost logo

Boost Users :

From: Gero Peterhoff (g.peterhoff_at_[hidden])
Date: 2022-12-09 08:40:20


Hi John,
i miss these for C++17/20/23 in boost/config. Can you retrofit this?

thx
Gero



It could look like this:
see https://en.cppreference.com/w/cpp/feature_test#__cpp_constexpr

#if (__cpp_constexpr < 201703L)
        #define BOOST_NO_CXX17_CONSTEXPR
#endif

#if defined(BOOST_NO_CXX17_CONSTEXPR)
        #define BOOST_CXX17_CONSTEXPR
#else
        #define BOOST_CXX17_CONSTEXPR constexpr
#endif



#if (__cpp_constexpr < 202002L)
        #define BOOST_NO_CXX20_CONSTEXPR
#endif

#if defined(BOOST_NO_CXX20_CONSTEXPR)
        #define BOOST_CXX20_CONSTEXPR
#else
        #define BOOST_CXX20_CONSTEXPR constexpr
#endif



#if (__cpp_constexpr < 202207L)
        #define BOOST_NO_CXX23_CONSTEXPR
#endif

#if defined(BOOST_NO_CXX23_CONSTEXPR)
        #define BOOST_CXX23_CONSTEXPR
#else
        #define BOOST_CXX23_CONSTEXPR constexpr
#endif




Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net