More constexpr friendly replace and insert with is_constant_evaluated

This commit is contained in:
Krystian Stasiowski
2020-01-03 19:01:34 -05:00
parent e1e992380a
commit 26b9f7df27
3 changed files with 33 additions and 2 deletions

View File

@ -25,6 +25,16 @@
#define BOOST_STATIC_STRING_USE_DEDUCT
#endif
// Include <version> if we can
#if __has_include(<version>)
#include <version>
#endif
// Can we use is_constant_evaluated?
#if __cpp_lib_is_constant_evaluated >= 201811L
#define BOOST_STATIC_STRING_USE_IS_CONST_EVAL
#endif
// Can we use [[nodiscard]]?
#ifdef __has_attribute
#if __has_attribute(nodiscard)