From 4b608310b6403496a3175c889c4cdb8ccfa9e7ea Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Thu, 22 Jun 2023 09:16:01 +0200 Subject: [PATCH] Fix macro definitions --- include/boost/charconv/detail/config.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/boost/charconv/detail/config.hpp b/include/boost/charconv/detail/config.hpp index 5380957..4c343f3 100644 --- a/include/boost/charconv/detail/config.hpp +++ b/include/boost/charconv/detail/config.hpp @@ -162,7 +162,7 @@ static_assert((BOOST_CHARCONV_ENDIAN_BIG_BYTE || BOOST_CHARCONV_ENDIAN_LITTLE_BY # define BOOST_CHARCONV_NO_CONSTEXPR_DETECTION #endif -#if BOOST_MSVC +#ifdef BOOST_MSVC # define BOOST_CHARCONV_ASSUME(expr) __assume(expr) #elif defined(__clang__) # define BOOST_CHARCONV_ASSUME(expr) __builtin_assume(expr) @@ -171,6 +171,8 @@ static_assert((BOOST_CHARCONV_ENDIAN_BIG_BYTE || BOOST_CHARCONV_ENDIAN_LITTLE_BY #elif defined(__has_cpp_attribute) # if __has_cpp_attribute(assume) # define BOOST_CHARCONV_ASSUME(expr) [[assume(expr)]] +# else +# define BOOST_CHARCONV_ASSUME(expr) # endif #else # define BOOST_CHARCONV_ASSUME(expr)