Skip to content

Commit de52a9b

Browse files
committed
Ignore MSVC 4756
1 parent 041bbeb commit de52a9b

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

include/boost/safe_numbers/literals.hpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,11 @@ BOOST_SAFE_NUMBERS_EXPORT constexpr auto operator ""_i128(const char* str) -> i1
141141
return i128{result};
142142
}
143143

144+
#ifdef _MSC_VER
145+
# pragma warning(push)
146+
# pragma warning(disable: 4756)
147+
#endif
148+
144149
BOOST_SAFE_NUMBERS_EXPORT constexpr auto operator ""_f32(const long double val) -> f32
145150
{
146151
if (constexpr auto max_value {static_cast<long double>(std::numeric_limits<float>::max())}; val > max_value)
@@ -161,6 +166,10 @@ BOOST_SAFE_NUMBERS_EXPORT constexpr auto operator ""_f64(const long double val)
161166
return static_cast<f64>(static_cast<double>(val));
162167
}
163168

169+
#ifdef _MSC_VER
170+
# pragma warning(pop)
171+
#endif
172+
164173
} // boost::safe_numbers::literals
165174

166175
#endif // BOOST_SAFE_NUMBERS_LITERALS_HPP

0 commit comments

Comments
 (0)