Skip to content

Commit 8b828e9

Browse files
committed
[libcxx][test] Silence MSVC signed-to-unsigned implicit conversion warnings
1 parent 8f9eb70 commit 8b828e9

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

libcxx/test/std/containers/sequences/array/at.pass.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ void test_exceptions()
7777
}
7878

7979
try {
80-
TEST_IGNORE_NODISCARD array.at(-1);
80+
using size_type = decltype(array)::size_type;
81+
TEST_IGNORE_NODISCARD array.at(static_cast<size_type>(-1));
8182
assert(false);
8283
} catch (std::out_of_range const&) {
8384
// pass

libcxx/test/std/containers/sequences/array/at_const.pass.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ void test_exceptions()
7373
}
7474

7575
try {
76-
TEST_IGNORE_NODISCARD array.at(-1);
76+
using size_type = decltype(array)::size_type;
77+
TEST_IGNORE_NODISCARD array.at(static_cast<size_type>(-1));
7778
assert(false);
7879
} catch (std::out_of_range const&) {
7980
// pass

0 commit comments

Comments
 (0)