Index: src/base/macros.h |
diff --git a/src/base/macros.h b/src/base/macros.h |
index f904f529fd4bdcb1efc8077f9f560a51eedf4da6..10cab4b2bfc67fdaa31c0dd2eed2e346bf51d531 100644 |
--- a/src/base/macros.h |
+++ b/src/base/macros.h |
@@ -218,32 +218,8 @@ V8_INLINE Dest bit_cast(Source const& source) { |
#endif |
-// Use C++11 static_assert if possible, which gives error |
-// messages that are easier to understand on first sight. |
-#if V8_HAS_CXX11_STATIC_ASSERT |
+// TODO(all) Replace all uses of this macro with static_assert, remove macro. |
#define STATIC_ASSERT(test) static_assert(test, #test) |
-#else |
-// This is inspired by the static assertion facility in boost. This |
-// is pretty magical. If it causes you trouble on a platform you may |
-// find a fix in the boost code. |
-template <bool> class StaticAssertion; |
-template <> class StaticAssertion<true> { }; |
-// This macro joins two tokens. If one of the tokens is a macro the |
-// helper call causes it to be resolved before joining. |
-#define SEMI_STATIC_JOIN(a, b) SEMI_STATIC_JOIN_HELPER(a, b) |
-#define SEMI_STATIC_JOIN_HELPER(a, b) a##b |
-// Causes an error during compilation of the condition is not |
-// statically known to be true. It is formulated as a typedef so that |
-// it can be used wherever a typedef can be used. Beware that this |
-// actually causes each use to introduce a new defined type with a |
-// name depending on the source line. |
-template <int> class StaticAssertionHelper { }; |
-#define STATIC_ASSERT(test) \ |
- typedef StaticAssertionHelper< \ |
- sizeof(StaticAssertion<static_cast<bool>((test))>)> \ |
- SEMI_STATIC_JOIN(__StaticAssertTypedef__, __LINE__) ALLOW_UNUSED_TYPE |
- |
-#endif |
// The USE(x) template is used to silence C++ compiler warnings |