https://bugs.gentoo.org/932579 https://github.com/boostorg/charconv/pull/183 --- a/boost/charconv/detail/bit_layouts.hpp +++ b/boost/charconv/detail/bit_layouts.hpp @@ -106,7 +106,7 @@ struct IEEEl2bits #define BOOST_CHARCONV_LDBL_BITS 64 #else // Unsupported long double representation -# define BOOST_MATH_UNSUPPORTED_LONG_DOUBLE +# define BOOST_CHARCONV_UNSUPPORTED_LONG_DOUBLE # define BOOST_CHARCONV_LDBL_BITS -1 #endif --- a/boost/charconv/from_chars.hpp +++ b/boost/charconv/from_chars.hpp @@ -140,7 +140,7 @@ BOOST_CHARCONV_GCC5_CONSTEXPR from_chars_result from_chars(boost::core::string_v BOOST_CHARCONV_DECL from_chars_result from_chars_erange(const char* first, const char* last, float& value, chars_format fmt = chars_format::general) noexcept; BOOST_CHARCONV_DECL from_chars_result from_chars_erange(const char* first, const char* last, double& value, chars_format fmt = chars_format::general) noexcept; -#ifndef BOOST_MATH_UNSUPPORTED_LONG_DOUBLE +#ifndef BOOST_CHARCONV_UNSUPPORTED_LONG_DOUBLE BOOST_CHARCONV_DECL from_chars_result from_chars_erange(const char* first, const char* last, long double& value, chars_format fmt = chars_format::general) noexcept; #endif @@ -168,7 +168,7 @@ BOOST_CHARCONV_DECL from_chars_result from_chars_erange(const char* first, const BOOST_CHARCONV_DECL from_chars_result from_chars_erange(boost::core::string_view sv, float& value, chars_format fmt = chars_format::general) noexcept; BOOST_CHARCONV_DECL from_chars_result from_chars_erange(boost::core::string_view sv, double& value, chars_format fmt = chars_format::general) noexcept; -#ifndef BOOST_MATH_UNSUPPORTED_LONG_DOUBLE +#ifndef BOOST_CHARCONV_UNSUPPORTED_LONG_DOUBLE BOOST_CHARCONV_DECL from_chars_result from_chars_erange(boost::core::string_view sv, long double& value, chars_format fmt = chars_format::general) noexcept; #endif @@ -200,7 +200,7 @@ BOOST_CHARCONV_DECL from_chars_result from_chars_erange(boost::core::string_view BOOST_CHARCONV_DECL from_chars_result from_chars(const char* first, const char* last, float& value, chars_format fmt = chars_format::general) noexcept; BOOST_CHARCONV_DECL from_chars_result from_chars(const char* first, const char* last, double& value, chars_format fmt = chars_format::general) noexcept; -#ifndef BOOST_MATH_UNSUPPORTED_LONG_DOUBLE +#ifndef BOOST_CHARCONV_UNSUPPORTED_LONG_DOUBLE BOOST_CHARCONV_DECL from_chars_result from_chars(const char* first, const char* last, long double& value, chars_format fmt = chars_format::general) noexcept; #endif @@ -226,7 +226,7 @@ BOOST_CHARCONV_DECL from_chars_result from_chars(const char* first, const char* BOOST_CHARCONV_DECL from_chars_result from_chars(boost::core::string_view sv, float& value, chars_format fmt = chars_format::general) noexcept; BOOST_CHARCONV_DECL from_chars_result from_chars(boost::core::string_view sv, double& value, chars_format fmt = chars_format::general) noexcept; -#ifndef BOOST_MATH_UNSUPPORTED_LONG_DOUBLE +#ifndef BOOST_CHARCONV_UNSUPPORTED_LONG_DOUBLE BOOST_CHARCONV_DECL from_chars_result from_chars(boost::core::string_view sv, long double& value, chars_format fmt = chars_format::general) noexcept; #endif --- a/boost/charconv/to_chars.hpp +++ b/boost/charconv/to_chars.hpp @@ -82,7 +82,7 @@ BOOST_CHARCONV_DECL to_chars_result to_chars(char* first, char* last, float valu BOOST_CHARCONV_DECL to_chars_result to_chars(char* first, char* last, double value, chars_format fmt = chars_format::general) noexcept; -#ifndef BOOST_MATH_UNSUPPORTED_LONG_DOUBLE +#ifndef BOOST_CHARCONV_UNSUPPORTED_LONG_DOUBLE BOOST_CHARCONV_DECL to_chars_result to_chars(char* first, char* last, long double value, chars_format fmt = chars_format::general) noexcept; #endif @@ -92,7 +92,7 @@ BOOST_CHARCONV_DECL to_chars_result to_chars(char* first, char* last, float valu BOOST_CHARCONV_DECL to_chars_result to_chars(char* first, char* last, double value, chars_format fmt, int precision) noexcept; -#ifndef BOOST_MATH_UNSUPPORTED_LONG_DOUBLE +#ifndef BOOST_CHARCONV_UNSUPPORTED_LONG_DOUBLE BOOST_CHARCONV_DECL to_chars_result to_chars(char* first, char* last, long double value, chars_format fmt, int precision) noexcept; #endif --- a/libs/charconv/src/from_chars.cpp +++ b/libs/charconv/src/from_chars.cpp @@ -205,7 +205,7 @@ boost::charconv::from_chars_result boost::charconv::from_chars_erange(const char return r; } -#elif !defined(BOOST_MATH_UNSUPPORTED_LONG_DOUBLE) +#elif !defined(BOOST_CHARCONV_UNSUPPORTED_LONG_DOUBLE) boost::charconv::from_chars_result boost::charconv::from_chars_erange(const char* first, const char* last, long double& value, boost::charconv::chars_format fmt) noexcept { @@ -299,7 +299,7 @@ boost::charconv::from_chars_result boost::charconv::from_chars_erange(boost::cor return boost::charconv::from_chars_erange(sv.data(), sv.data() + sv.size(), value, fmt); } -#ifndef BOOST_MATH_UNSUPPORTED_LONG_DOUBLE +#ifndef BOOST_CHARCONV_UNSUPPORTED_LONG_DOUBLE boost::charconv::from_chars_result boost::charconv::from_chars_erange(boost::core::string_view sv, long double& value, boost::charconv::chars_format fmt) noexcept { return boost::charconv::from_chars_erange(sv.data(), sv.data() + sv.size(), value, fmt); @@ -374,7 +374,7 @@ boost::charconv::from_chars_result boost::charconv::from_chars(const char* first return from_chars_strict_impl(first, last, value, fmt); } -#ifndef BOOST_MATH_UNSUPPORTED_LONG_DOUBLE +#ifndef BOOST_CHARCONV_UNSUPPORTED_LONG_DOUBLE boost::charconv::from_chars_result boost::charconv::from_chars(const char* first, const char* last, long double& value, boost::charconv::chars_format fmt) noexcept { return from_chars_strict_impl(first, last, value, fmt); @@ -433,7 +433,7 @@ boost::charconv::from_chars_result boost::charconv::from_chars(boost::core::stri return from_chars_strict_impl(sv.data(), sv.data() + sv.size(), value, fmt); } -#ifndef BOOST_MATH_UNSUPPORTED_LONG_DOUBLE +#ifndef BOOST_CHARCONV_UNSUPPORTED_LONG_DOUBLE boost::charconv::from_chars_result boost::charconv::from_chars(boost::core::string_view sv, long double& value, boost::charconv::chars_format fmt) noexcept { return from_chars_strict_impl(sv.data(), sv.data() + sv.size(), value, fmt); --- a/libs/charconv/src/to_chars.cpp +++ b/libs/charconv/src/to_chars.cpp @@ -601,7 +601,7 @@ boost::charconv::to_chars_result boost::charconv::to_chars(char* first, char* la return boost::charconv::detail::to_chars_float_impl(first, last, static_cast(value), fmt, precision); } -#elif (BOOST_CHARCONV_LDBL_BITS == 80 || BOOST_CHARCONV_LDBL_BITS == 128) +#elif !defined(BOOST_CHARCONV_UNSUPPORTED_LONG_DOUBLE) boost::charconv::to_chars_result boost::charconv::to_chars(char* first, char* last, long double value, boost::charconv::chars_format fmt) noexcept --- a/libs/charconv/test/from_chars_float.cpp +++ b/libs/charconv/test/from_chars_float.cpp @@ -440,7 +440,7 @@ void test_issue_37() overflow_spot_value("1.0e+9999", HUGE_VAL); overflow_spot_value("-1.0e+9999", -HUGE_VAL); } - #ifndef BOOST_MATH_UNSUPPORTED_LONG_DOUBLE + #ifndef BOOST_CHARCONV_UNSUPPORTED_LONG_DOUBLE else { overflow_spot_value("1e99999", HUGE_VALL); @@ -532,7 +532,7 @@ int main() odd_strings_test(); odd_strings_test(); - #ifndef BOOST_MATH_UNSUPPORTED_LONG_DOUBLE + #ifndef BOOST_CHARCONV_UNSUPPORTED_LONG_DOUBLE simple_integer_test(); simple_hex_integer_test(); simple_scientific_test(); @@ -1883,7 +1883,7 @@ int main() spot_check_invalid_argument(" 1.23", fmt); spot_check_invalid_argument(" 1.23", fmt); - #ifndef BOOST_MATH_UNSUPPORTED_LONG_DOUBLE + #ifndef BOOST_CHARCONV_UNSUPPORTED_LONG_DOUBLE spot_check_nan("nan", fmt); spot_check_nan("-nan", fmt); spot_check_inf("inf", fmt); --- a/libs/charconv/test/from_chars_string_view.cpp +++ b/libs/charconv/test/from_chars_string_view.cpp @@ -120,7 +120,7 @@ int main() test_float(); test_float(); - #ifndef BOOST_MATH_UNSUPPORTED_LONG_DOUBLE + #ifndef BOOST_CHARCONV_UNSUPPORTED_LONG_DOUBLE test_float(); test_float(); #endif @@ -130,7 +130,7 @@ int main() test_float(); test_float(); - #ifndef BOOST_MATH_UNSUPPORTED_LONG_DOUBLE + #ifndef BOOST_CHARCONV_UNSUPPORTED_LONG_DOUBLE test_float(); #endif --- a/libs/charconv/test/github_issue_110.cpp +++ b/libs/charconv/test/github_issue_110.cpp @@ -43,7 +43,7 @@ int main() test(); test(); - #ifndef BOOST_MATH_UNSUPPORTED_LONG_DOUBLE + #ifndef BOOST_CHARCONV_UNSUPPORTED_LONG_DOUBLE test(); #endif --- a/libs/charconv/test/github_issue_122.cpp +++ b/libs/charconv/test/github_issue_122.cpp @@ -53,7 +53,7 @@ int main() test(); test(); - #ifndef BOOST_MATH_UNSUPPORTED_LONG_DOUBLE + #ifndef BOOST_CHARCONV_UNSUPPORTED_LONG_DOUBLE test(); #endif --- a/libs/charconv/test/github_issue_152.cpp +++ b/libs/charconv/test/github_issue_152.cpp @@ -229,7 +229,7 @@ int main() test_failed_values(); #endif - #ifndef BOOST_MATH_UNSUPPORTED_LONG_DOUBLE + #ifndef BOOST_CHARCONV_UNSUPPORTED_LONG_DOUBLE test_non_finite(); test_non_finite_fixed_precision(); test_min_buffer_size(); --- a/libs/charconv/test/github_issue_158.cpp +++ b/libs/charconv/test/github_issue_158.cpp @@ -93,7 +93,7 @@ void test_values_with_negative_exp() BOOST_TEST_CSTR_EQ(buffer, "0.00000000000000000000099999999999999990753745222790"); } -#ifndef BOOST_MATH_UNSUPPORTED_LONG_DOUBLE +#ifndef BOOST_CHARCONV_UNSUPPORTED_LONG_DOUBLE void test_long_double_with_negative_exp() { char buffer[256]; @@ -409,7 +409,7 @@ void test_zero() BOOST_TEST_CSTR_EQ(buffer, "0"); } -#ifndef BOOST_MATH_UNSUPPORTED_LONG_DOUBLE +#ifndef BOOST_CHARCONV_UNSUPPORTED_LONG_DOUBLE void test_long_double_with_positive_exp() { char buffer[256]; --- a/libs/charconv/test/limits.cpp +++ b/libs/charconv/test/limits.cpp @@ -228,7 +228,7 @@ int main() test_floating_point(); test_floating_point(); - #ifndef BOOST_MATH_UNSUPPORTED_LONG_DOUBLE + #ifndef BOOST_CHARCONV_UNSUPPORTED_LONG_DOUBLE test_floating_point(); #endif --- a/libs/charconv/test/limits_link_1.cpp +++ b/libs/charconv/test/limits_link_1.cpp @@ -29,7 +29,7 @@ void f1() test(); test(); - #ifndef BOOST_MATH_UNSUPPORTED_LONG_DOUBLE + #ifndef BOOST_CHARCONV_UNSUPPORTED_LONG_DOUBLE test(); #endif --- a/libs/charconv/test/limits_link_2.cpp +++ b/libs/charconv/test/limits_link_2.cpp @@ -29,7 +29,7 @@ void f2() test(); test(); - #ifndef BOOST_MATH_UNSUPPORTED_LONG_DOUBLE + #ifndef BOOST_CHARCONV_UNSUPPORTED_LONG_DOUBLE test(); #endif --- a/libs/charconv/test/roundtrip.cpp +++ b/libs/charconv/test/roundtrip.cpp @@ -347,7 +347,7 @@ template int64_t Distance(FPType y, FPType x) return ToOrdinal(y) - ToOrdinal(x); } -#ifndef BOOST_MATH_UNSUPPORTED_LONG_DOUBLE +#ifndef BOOST_CHARCONV_UNSUPPORTED_LONG_DOUBLE template <> void test_roundtrip(long double value) { char buffer[ 256 ]; @@ -603,7 +603,7 @@ int main() #endif // long double - #if !(BOOST_CHARCONV_LDBL_BITS == 128) && !defined(BOOST_MATH_UNSUPPORTED_LONG_DOUBLE) + #if !(BOOST_CHARCONV_LDBL_BITS == 128) && !defined(BOOST_CHARCONV_UNSUPPORTED_LONG_DOUBLE) { long double const ql = std::pow( 1.0L, -64 ); --- a/libs/charconv/test/to_chars_float.cpp +++ b/libs/charconv/test/to_chars_float.cpp @@ -202,7 +202,7 @@ int main() non_finite_values(boost::charconv::chars_format::hex, 2); // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57484 - #if !(defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ < 9 && defined(__i686__)) && !defined(BOOST_MATH_UNSUPPORTED_LONG_DOUBLE) + #if !(defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ < 9 && defined(__i686__)) && !defined(BOOST_CHARCONV_UNSUPPORTED_LONG_DOUBLE) non_finite_values(); #endif --- a/libs/charconv/test/to_chars_float_STL_comp.cpp +++ b/libs/charconv/test/to_chars_float_STL_comp.cpp @@ -212,7 +212,7 @@ int main() // General format random_test(); random_test(); - #ifndef BOOST_MATH_UNSUPPORTED_LONG_DOUBLE + #ifndef BOOST_CHARCONV_UNSUPPORTED_LONG_DOUBLE random_test(); #endif @@ -227,7 +227,7 @@ int main() // Scientific random_test(boost::charconv::chars_format::scientific); random_test(boost::charconv::chars_format::scientific); - #ifndef BOOST_MATH_UNSUPPORTED_LONG_DOUBLE + #ifndef BOOST_CHARCONV_UNSUPPORTED_LONG_DOUBLE random_test(boost::charconv::chars_format::scientific); #endif test_spot(0.0, boost::charconv::chars_format::scientific); @@ -242,7 +242,7 @@ int main() // Hex random_test(boost::charconv::chars_format::hex); random_test(boost::charconv::chars_format::hex); - #ifndef BOOST_MATH_UNSUPPORTED_LONG_DOUBLE + #ifndef BOOST_CHARCONV_UNSUPPORTED_LONG_DOUBLE random_test(boost::charconv::chars_format::hex); #endif @@ -250,7 +250,7 @@ int main() random_test(boost::charconv::chars_format::hex, -1e5F, 1e5F); random_test(boost::charconv::chars_format::hex, -1e5, 1e5); - #ifndef BOOST_MATH_UNSUPPORTED_LONG_DOUBLE + #ifndef BOOST_CHARCONV_UNSUPPORTED_LONG_DOUBLE random_test(boost::charconv::chars_format::hex, -1e5L, 1e5L); #endif @@ -277,7 +277,7 @@ int main() non_finite_test(boost::charconv::chars_format::hex); non_finite_test(boost::charconv::chars_format::hex); - #ifndef BOOST_MATH_UNSUPPORTED_LONG_DOUBLE + #ifndef BOOST_CHARCONV_UNSUPPORTED_LONG_DOUBLE non_finite_test(); non_finite_test(boost::charconv::chars_format::scientific); non_finite_test(boost::charconv::chars_format::hex); @@ -303,7 +303,7 @@ int main() test_spot(3.3F); test_spot(3.3); - #ifndef BOOST_MATH_UNSUPPORTED_LONG_DOUBLE + #ifndef BOOST_CHARCONV_UNSUPPORTED_LONG_DOUBLE test_spot(3.3L); #endif --- a/libs/charconv/test/to_chars_sprintf.cpp +++ b/libs/charconv/test/to_chars_sprintf.cpp @@ -627,7 +627,7 @@ int main() // long double - #ifndef BOOST_MATH_UNSUPPORTED_LONG_DOUBLE + #ifndef BOOST_CHARCONV_UNSUPPORTED_LONG_DOUBLE { for( int i = 0; i < N; ++i ) { -- 2.45.2