Skip to content

Commit b2e8b1b

Browse files
committed
Ignore unreachable code error
1 parent 50aafa3 commit b2e8b1b

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

include/boost/decimal/charconv.hpp

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include <boost/decimal/detail/countl.hpp>
2727
#include <boost/decimal/detail/remove_trailing_zeros.hpp>
2828
#include <boost/decimal/detail/promotion.hpp>
29+
#include <boost/charconv/detail/integer_search_trees.hpp>
2930

3031
#ifndef BOOST_DECIMAL_BUILD_MODULE
3132
#include <cstdint>
@@ -1109,6 +1110,11 @@ constexpr auto to_chars_hex_impl(char* first, char* last, const TargetDecimalTyp
11091110
return to_chars_integer_impl<std::uint32_t>(first, last, static_cast<std::uint32_t>(abs_exp));
11101111
}
11111112

1113+
#ifdef _MSC_VER
1114+
# pragma warning(push)
1115+
# pragma warning(disable: 4702) // Unreachable code
1116+
#endif
1117+
11121118
template <BOOST_DECIMAL_DECIMAL_FLOATING_TYPE TargetDecimalType>
11131119
constexpr auto to_chars_cohort_preserving_scientific(char* first, char* last, const TargetDecimalType& value) noexcept -> to_chars_result
11141120
{
@@ -1175,11 +1181,6 @@ constexpr auto to_chars_cohort_preserving_scientific(char* first, char* last, co
11751181
return to_chars_integer_impl<std::uint32_t>(first, last, abs_exp);
11761182
}
11771183

1178-
#ifdef _MSC_VER
1179-
# pragma warning(push)
1180-
# pragma warning(disable: 4702) // Unreachable code
1181-
#endif
1182-
11831184
template <BOOST_DECIMAL_DECIMAL_FLOATING_TYPE TargetDecimalType>
11841185
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
11851186
{
@@ -1261,6 +1262,10 @@ constexpr auto to_chars_impl(char* first, char* last, const TargetDecimalType& v
12611262
return to_chars_scientific_impl(first, last, value, fmt, local_precision); // LCOV_EXCL_LINE
12621263
}
12631264

1265+
#ifdef _MSC_VER
1266+
# pragma warning(pop)
1267+
#endif
1268+
12641269
} //namespace detail
12651270

12661271
BOOST_DECIMAL_EXPORT template <BOOST_DECIMAL_DECIMAL_FLOATING_TYPE TargetDecimalType>

0 commit comments

Comments
 (0)