Skip to content

Commit c8a4cd6

Browse files
committed
Ignore MSVC warnings from 14.2
1 parent 6c85c62 commit c8a4cd6

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

test/test_isqrt.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,12 @@ void test_isqrt_against_ipow()
231231
}
232232
}
233233

234+
#ifdef _MSC_VER
235+
# pragma warning(push)
236+
# pragma warning(disable : 4307) // integral constant overflow
237+
# pragma warning(disable : 4308) // negative integral constant converted to unsigned type
238+
#endif
239+
234240
void test_constexpr_isqrt()
235241
{
236242
constexpr uint128_t r1 {isqrt(uint128_t{0})};
@@ -252,6 +258,10 @@ void test_constexpr_isqrt()
252258
static_assert(r6 == int128_t{111}, "isqrt(12321) constexpr");
253259
}
254260

261+
#ifdef _MSC_VER
262+
# pragma warning(pop)
263+
#endif
264+
255265
int main()
256266
{
257267
test_uint128_isqrt_small();

0 commit comments

Comments
 (0)