diff options
author | Stephan T. Lavavej <stl@exchange.microsoft.com> | 2016-12-06 01:14:29 +0000 |
---|---|---|
committer | Stephan T. Lavavej <stl@exchange.microsoft.com> | 2016-12-06 01:14:29 +0000 |
commit | baa547b99670a3652b8a1b0b47e853d58ee18093 (patch) | |
tree | ad7d83655eea6b0848831ab276a968c536b15f95 /libcxx/test/std/strings/basic.string/string.cons/pointer_alloc.pass.cpp | |
parent | fe4ca8c5398524b3fc1aa1225bf2ddd57ae4f2ca (diff) | |
download | bcm5719-llvm-baa547b99670a3652b8a1b0b47e853d58ee18093.tar.gz bcm5719-llvm-baa547b99670a3652b8a1b0b47e853d58ee18093.zip |
[libcxx] [test] D27267: Fix MSVC x64 warning C4267 "conversion from 'size_t' to 'int' [or 'unsigned int'], possible loss of data", part 1/4.
Replace "int n = str_.size();" with "int n = static_cast<int>(str_.size());".
int is the correct type to use, because we're eventually calling
"base::pbump(n+1);" where base is std::basic_streambuf.
N4606 27.6.3.3.3 [streambuf.put.area]/4 declares: "void pbump(int n);"
llvm-svn: 288751
Diffstat (limited to 'libcxx/test/std/strings/basic.string/string.cons/pointer_alloc.pass.cpp')
0 files changed, 0 insertions, 0 deletions