[PATCH] D26782: [libcxx] [test] Test changes for P0504R0 "Revisiting in-place tag types for any/optional/variant"
Marshall Clow via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 16 21:06:06 PST 2016
mclow.lists added a comment.
Do these tests pass with the current `<any>` implementation, or will they have to wait?
================
Comment at: test/std/utilities/utility/utility.inplace/inplace.pass.cpp:40
-template <class Tp>
-struct CheckRet : std::false_type {};
-template <class Arg>
-struct CheckRet<std::in_place_tag(Arg)> : std::true_type {};
+#define STATIC_ASSERT(...) static_assert((__VA_ARGS__), #__VA_ARGS__)
----------------
Please just use `static_assert(x)` instead. Since this is C++1z only, you don't need to supply a message. If the test fails, the compiler will give you file and line #.
If I see an all caps `STATIC_ASSERT`, then my first bit of research has to be "how is this different from `static_assert`?"
https://reviews.llvm.org/D26782
More information about the cfe-commits
mailing list