Fix possible loss of data warnings on amd64
authorBilly Robert O'Neal III <bion@microsoft.com>
Mon, 8 May 2017 21:54:53 +0000 (21:54 +0000)
committerBilly Robert O'Neal III <bion@microsoft.com>
Mon, 8 May 2017 21:54:53 +0000 (21:54 +0000)
commit362ea7329fc8bd5a7080a78d606066024ac40b11
tree2e5945c9eb45ea89ae39e1f5d034324ebc274ab1
parent8c401179a33273d9e606a648881885564298b989
Fix possible loss of data warnings on amd64

In T_size_size.pass, there is an explicit template argument to std::min to ask
for unsigned, to avoid type deduction errors. However, C1XX' warnings still
hate this use, because a 64 bit value (a size_t) is being passed to a function
accepting an unsigned (a 32 bit value).

Instead, change the tests to pass around std::size_t instances, and explicitly
narrow when constructing the string type under test. This also allows
removal of explicit template arguments to std::min.

llvm-svn: 302473
libcxx/test/std/strings/basic.string/string.cons/T_size_size.pass.cpp