diff options
author | Stephan T. Lavavej <stl@exchange.microsoft.com> | 2016-12-06 01:13:14 +0000 |
---|---|---|
committer | Stephan T. Lavavej <stl@exchange.microsoft.com> | 2016-12-06 01:13:14 +0000 |
commit | 68a694b800a9bb5f5cbbc5d8c956a87273356d20 (patch) | |
tree | a430a87c856cde5972651895df9f274cdd98a9e3 /libcxx/test/std/numerics/numarray/valarray.range/end_const.pass.cpp | |
parent | fbfb2ab63e94f1b0c248cd810ae3fb35889d99b6 (diff) | |
download | bcm5719-llvm-68a694b800a9bb5f5cbbc5d8c956a87273356d20.tar.gz bcm5719-llvm-68a694b800a9bb5f5cbbc5d8c956a87273356d20.zip |
[libcxx] [test] D27022: Fix MSVC warning C4389 "signed/unsigned mismatch", part 9/12.
Add static_cast<std::size_t> to more comparisons. (Performed manually, unlike part 8/12.)
Also, include <cstddef> when it wasn't already being included.
llvm-svn: 288746
Diffstat (limited to 'libcxx/test/std/numerics/numarray/valarray.range/end_const.pass.cpp')
-rw-r--r-- | libcxx/test/std/numerics/numarray/valarray.range/end_const.pass.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libcxx/test/std/numerics/numarray/valarray.range/end_const.pass.cpp b/libcxx/test/std/numerics/numarray/valarray.range/end_const.pass.cpp index 7363508943b..4d0015343e9 100644 --- a/libcxx/test/std/numerics/numarray/valarray.range/end_const.pass.cpp +++ b/libcxx/test/std/numerics/numarray/valarray.range/end_const.pass.cpp @@ -17,6 +17,7 @@ #include <valarray> #include <cassert> +#include <cstddef> int main() { @@ -26,6 +27,6 @@ int main() const unsigned N = sizeof(a)/sizeof(a[0]); const std::valarray<T> v(a, N); assert(v[v.size()-1] == 5); - assert(end(v) - begin(v) == v.size()); + assert(static_cast<std::size_t>(end(v) - begin(v)) == v.size()); } } |