Commit 56863904 authored by jgruber's avatar jgruber Committed by Commit Bot

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/1216183Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55767}
parent 018332c4
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment