Undeprecate the STATIC_ASSERT wrapper macro

In many cases, the condition already explains the assertion and a string
message clutters the code without adding value. This wrapper macro is
actually very useful in such cases.

Change-Id: I44f27c1c9255f5fc80453c92565f07f8f3cbacae
Reviewed-on: https://chromium-review.googlesource.com/1216183
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55767}
This commit is contained in:
jgruber 2018-09-10 16:03:53 +02:00 committed by Commit Bot
parent 018332c46b
commit 56863904be

View File

@ -195,8 +195,9 @@ V8_INLINE Dest bit_cast(Source const& source) {
#define V8_IMMEDIATE_CRASH() ((void(*)())0)()
#endif
// TODO(all) Replace all uses of this macro with static_assert, remove macro.
// A convenience wrapper around static_assert without a string message argument.
// Once C++17 becomes the default, this macro can be removed in favor of the
// new static_assert(condition) overload.
#define STATIC_ASSERT(test) static_assert(test, #test)
namespace v8 {