From 25ea4e016c586ec8dd54d38894d54db1e03d3955 Mon Sep 17 00:00:00 2001 From: mutouyun Date: Sat, 28 Sep 2024 20:41:23 +0800 Subject: [PATCH] add LIBIMP_INLINE_CONSTEXPR --- include/libimp/detect_plat.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/libimp/detect_plat.h b/include/libimp/detect_plat.h index 1bc12dc..b6f5ec1 100644 --- a/include/libimp/detect_plat.h +++ b/include/libimp/detect_plat.h @@ -106,6 +106,14 @@ # error "This C++ version is unsupported." #endif +/// \brief Feature cross-platform adaptation. + +#if defined(LIBIMP_CPP_17) +# define LIBIMP_INLINE_CONSTEXPR inline constexpr +#else +# define LIBIMP_INLINE_CONSTEXPR constexpr +#endif + /// \brief C++ attributes. /// \see https://en.cppreference.com/w/cpp/language/attributes