You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
libcxx/test/std/utilities/utility
Stephan T. Lavavej f18ee8f765 [libcxx] [test] Avoid MSVC truncation warnings.
MSVC emits "warning C4244: 'initializing': conversion from 'int'
to 'short', possible loss of data" when it sees pair<Whatever, short>
constructed from (whatever, 4), because int is being truncated to
short within pair's constructor. (The compiler doesn't take into
account the fact that 4 is a literal at the callsite; it generates
this warning when the constructor is instantiated, because it might
be called with a runtime-valued int that would actually truncate.)

Instead of static_cast<short>, we can simply change short to int
in these tests, without affecting the pair operations that they're
trying to test: move assignment, convert copy construction, and
convert move construction.

Fixes D45016.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@329973 91177308-0d34-0410-b5e6-96231b3b80d8
8 years ago
..
as_const [libcxx] [test] Untabify, NFC. 8 years ago
declval Fix a handful of tests that fail in C++03 10 years ago
exchange [libcxx] [test] Strip trailing whitespace, NFC. 8 years ago
forward Fix two failing -verify tests to tolerate old and new clang versions 8 years ago
operators Move test into test/std subdirectory. 11 years ago
pairs [libcxx] [test] Avoid MSVC truncation warnings. 8 years ago
utility.inplace Test changes for P0504R0 "Revisiting in-place tag types for any/optional/variant". Patch from Casey Carter 9 years ago
utility.swap Add is_swappable/is_nothrow_swappable traits 10 years ago
synopsis.pass.cpp Placate unused variable warnings uncovered by improvements to clang's -Wunused-variable 8 years ago