[libcxx-commits] [PATCH] D68681: [libc++][test] Miscellaneous MSVC cleanups
Arthur O'Dwyer via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Oct 9 10:27:57 PDT 2019
Quuxplusone 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
+
----------------
CaseyCarter wrote:
> 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.
Awesome. The CTAD tests LGTM! No opinion on the rest.
(It occurs to me that CTAD makes `std::hash()` mean `std::hash<void>()`, so maybe I should have avoided `hash<void>` and `equal_to<void>` in these tests to begin with.)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68681/new/
https://reviews.llvm.org/D68681
More information about the libcxx-commits
mailing list