[libcxx-commits] [PATCH] D68681: [libc++][test] Miscellaneous MSVC cleanups

Casey Carter via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Oct 9 10:18:43 PDT 2019


CaseyCarter added inline comments.


================
Comment at: test/std/containers/unord/unord.map/unord.map.cnstr/deduct.pass.cpp:70
+#pragma warning(disable: 4244) // '%s': conversion from '%s' to '%s', possible loss of data
+#endif // TEST_COMPILER_C1XX
+
----------------
Quuxplusone wrote:
> Alternatively, if you wanted to change the instances of `hash<short>` to `hash<>`, that would be fine with me. (Just as long as it's something distinguishable from the default of `hash<int>`.)
I do like the idea of avoiding rather than suppressing the warning. I'll change these tests to use `hash<long long>` instead of `hash<short>`, which avoids truncating conversions and preserves the "neither `int` nor `long`" property which provides some assurance the deduction guides aren't getting the type from the key type or mapped type.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68681/new/

https://reviews.llvm.org/D68681





More information about the libcxx-commits mailing list