[PATCH] D61365: [libcxx] [test] Suppress float->int narrowing warning in vector range-construction test.
Casey Carter via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri May 3 15:34:25 PDT 2019
CaseyCarter added inline comments.
================
Comment at: test/std/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp:159
float array[3] = {0.0f, 1.0f, 2.0f};
+#pragma warning(suppress: 4244) // narrowing float to int
std::vector<int> v(array, array + 3);
----------------
This will blow up non-MSVC-ish when running the test suite with `-Wall -W -Werror` (which is typical). I suggest wrapping in `#ifdef _MSC_VER`.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61365/new/
https://reviews.llvm.org/D61365
More information about the cfe-commits
mailing list