[PATCH] D26812: [libcxx] [test] In random tests, use real static_asserts and silence a warning.
Eric Fiselier via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 17 23:11:47 PST 2016
EricWF added a comment.
Fun libc++ fact: We implement almost all of the C++11 library in C++03.
These tests use `assert` because `min()` is not constexpr in C++03. If you don't mind please change the tests to:
#if TEST_STD_VER >= 11
static_assert(...);
#else
assert(...);
#endif
Feel free to commit after making those changes.
================
Comment at: test/std/numerics/rand/rand.eng/rand.eng.lcong/values.pass.cpp:44
+ #pragma warning(push)
+ #pragma warning(disable: 4310) // cast truncates constant value
+#endif // _MSC_VER
----------------
Warning "4310"? `#pragma GCC warning ignored "-Wwarning-name"` is so much better. Your compiler is bad and you should feel bad. :-P
https://reviews.llvm.org/D26812
More information about the cfe-commits
mailing list