Skip to content

Commit 2791693

Browse files
committed
Ignore MSVC warning
1 parent 50aafa3 commit 2791693

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

include/boost/decimal/charconv.hpp

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1109,6 +1109,11 @@ constexpr auto to_chars_hex_impl(char* first, char* last, const TargetDecimalTyp
11091109
return to_chars_integer_impl<std::uint32_t>(first, last, static_cast<std::uint32_t>(abs_exp));
11101110
}
11111111

1112+
#ifdef _MSC_VER
1113+
# pragma warning(push)
1114+
# pragma warning(disable: 4702) // Unreachable code
1115+
#endif
1116+
11121117
template <BOOST_DECIMAL_DECIMAL_FLOATING_TYPE TargetDecimalType>
11131118
constexpr auto to_chars_cohort_preserving_scientific(char* first, char* last, const TargetDecimalType& value) noexcept -> to_chars_result
11141119
{
@@ -1175,11 +1180,6 @@ constexpr auto to_chars_cohort_preserving_scientific(char* first, char* last, co
11751180
return to_chars_integer_impl<std::uint32_t>(first, last, abs_exp);
11761181
}
11771182

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

1264+
#ifdef _MSC_VER
1265+
# pragma warning(pop)
1266+
#endif
1267+
12641268
} //namespace detail
12651269

12661270
BOOST_DECIMAL_EXPORT template <BOOST_DECIMAL_DECIMAL_FLOATING_TYPE TargetDecimalType>

0 commit comments

Comments
 (0)