|
26 | 26 | #include <boost/decimal/detail/countl.hpp> |
27 | 27 | #include <boost/decimal/detail/remove_trailing_zeros.hpp> |
28 | 28 | #include <boost/decimal/detail/promotion.hpp> |
| 29 | +#include <boost/charconv/detail/integer_search_trees.hpp> |
29 | 30 |
|
30 | 31 | #ifndef BOOST_DECIMAL_BUILD_MODULE |
31 | 32 | #include <cstdint> |
@@ -1109,6 +1110,11 @@ constexpr auto to_chars_hex_impl(char* first, char* last, const TargetDecimalTyp |
1109 | 1110 | return to_chars_integer_impl<std::uint32_t>(first, last, static_cast<std::uint32_t>(abs_exp)); |
1110 | 1111 | } |
1111 | 1112 |
|
| 1113 | +#ifdef _MSC_VER |
| 1114 | +# pragma warning(push) |
| 1115 | +# pragma warning(disable: 4702) // Unreachable code |
| 1116 | +#endif |
| 1117 | + |
1112 | 1118 | template <BOOST_DECIMAL_DECIMAL_FLOATING_TYPE TargetDecimalType> |
1113 | 1119 | constexpr auto to_chars_cohort_preserving_scientific(char* first, char* last, const TargetDecimalType& value) noexcept -> to_chars_result |
1114 | 1120 | { |
@@ -1175,11 +1181,6 @@ constexpr auto to_chars_cohort_preserving_scientific(char* first, char* last, co |
1175 | 1181 | return to_chars_integer_impl<std::uint32_t>(first, last, abs_exp); |
1176 | 1182 | } |
1177 | 1183 |
|
1178 | | -#ifdef _MSC_VER |
1179 | | -# pragma warning(push) |
1180 | | -# pragma warning(disable: 4702) // Unreachable code |
1181 | | -#endif |
1182 | | - |
1183 | 1184 | template <BOOST_DECIMAL_DECIMAL_FLOATING_TYPE TargetDecimalType> |
1184 | 1185 | constexpr auto to_chars_impl(char* first, char* last, const TargetDecimalType& value, const chars_format fmt = chars_format::general, const int local_precision = -1) noexcept -> to_chars_result |
1185 | 1186 | { |
@@ -1261,6 +1262,10 @@ constexpr auto to_chars_impl(char* first, char* last, const TargetDecimalType& v |
1261 | 1262 | return to_chars_scientific_impl(first, last, value, fmt, local_precision); // LCOV_EXCL_LINE |
1262 | 1263 | } |
1263 | 1264 |
|
| 1265 | +#ifdef _MSC_VER |
| 1266 | +# pragma warning(pop) |
| 1267 | +#endif |
| 1268 | + |
1264 | 1269 | } //namespace detail |
1265 | 1270 |
|
1266 | 1271 | BOOST_DECIMAL_EXPORT template <BOOST_DECIMAL_DECIMAL_FLOATING_TYPE TargetDecimalType> |
|
0 commit comments