mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-24 03:32:35 +08:00
Enable the -Wsign-compare warning to better support MSVC
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@289363 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -23,11 +23,11 @@ int main()
|
||||
T a[] = {5, 4, 3, 2, 1};
|
||||
const unsigned N = sizeof(a)/sizeof(a[0]);
|
||||
std::valarray<T> v(a, N);
|
||||
for (int i = 0; i < N; ++i)
|
||||
for (unsigned i = 0; i < N; ++i)
|
||||
{
|
||||
assert(v[i] == a[i]);
|
||||
v[i] = i;
|
||||
assert(v[i] == i);
|
||||
assert(v[i] == static_cast<int>(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user