[libcxx] [test] D27019: Fix MSVC warning C4245 "conversion from 'X' to 'Y', signed/unsigned mismatch", part 6/12.

Add static_cast when initializing unsigned integers with negative numbers (in order to obtain big values).

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@287826 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Stephan T. Lavavej
2016-11-23 22:02:44 +00:00
parent bdf8bae8bb
commit 12f7f5d247
7 changed files with 15 additions and 15 deletions

View File

@@ -76,7 +76,7 @@ int main()
testbuf<char> sb;
std::ostream os(&sb);
hex(os);
unsigned long long n = -10;
unsigned long long n = static_cast<unsigned long long>(-10);
os << n;
assert(sb.str() == "fffffffffffffff6");
}