Remove uses of BOOST_STATIC_ASSERT

Ow, my eyes!  use static_assert instead.
Esse commit está contido em:
Edwin Smith
2013-06-26 14:17:18 -07:00
commit de Sara Golemon
commit 89ffdb7a01
6 arquivos alterados com 16 adições e 10 exclusões
+3 -3
Ver Arquivo
@@ -117,7 +117,7 @@ static_assert(!(KindOfClass & KindOfUncountedInitBit), "");
static_assert(KindOfUninit == 0,
"Several things assume this tag is 0, especially target cache");
BOOST_STATIC_ASSERT(MaxNumDataTypes - 1 <= kDataTypeMask);
static_assert(MaxNumDataTypes - 1 <= kDataTypeMask, "");
static_assert(kNotConstantValueTypeMask & KindOfArray &&
kNotConstantValueTypeMask & KindOfObject &&
@@ -230,8 +230,8 @@ inline ALWAYS_INLINE unsigned typeToDestrIndex(DataType t) {
#define IS_REFCOUNTED_TYPE(t) ((t) > KindOfRefCountThreshold)
// Helper macro for checking if a type is KindOfString or KindOfStaticString.
BOOST_STATIC_ASSERT(KindOfStaticString == 0x0C);
BOOST_STATIC_ASSERT(KindOfString == 0x14);
static_assert(KindOfStaticString == 0x0C, "");
static_assert(KindOfString == 0x14, "");
#define IS_STRING_TYPE(t) (((t) & ~0x18) == KindOfStringBit)
// Check if a type is KindOfUninit or KindOfNull
+4 -2
Ver Arquivo
@@ -480,7 +480,7 @@ class Array : protected SmartPtr<ArrayData> {
}
static void compileTimeAssertions() {
BOOST_STATIC_ASSERT((offsetof(Array, m_px) == kExpectedMPxOffset));
static_assert(offsetof(Array, m_px) == kExpectedMPxOffset, "");
}
};
@@ -509,8 +509,10 @@ struct ArrNR {
protected:
ArrayData *m_px;
private:
static void compileTimeAssertions() {
BOOST_STATIC_ASSERT((offsetof(ArrNR, m_px) == kExpectedMPxOffset));
static_assert(offsetof(ArrNR, m_px) == kExpectedMPxOffset, "");
}
};
+2 -1
Ver Arquivo
@@ -213,8 +213,9 @@ public:
private:
ObjectData* m_px;
static void compileTimeAssertions() {
BOOST_STATIC_ASSERT((offsetof(ObjNR, m_px) == kExpectedMPxOffset));
static_assert(offsetof(ObjNR, m_px) == kExpectedMPxOffset, "");
}
};
+4 -2
Ver Arquivo
@@ -434,7 +434,7 @@ public:
}
static void compileTimeAssertions() {
BOOST_STATIC_ASSERT((offsetof(String, m_px) == kExpectedMPxOffset));
static_assert(offsetof(String, m_px) == kExpectedMPxOffset, "");
}
};
@@ -559,8 +559,10 @@ public:
protected:
StringData *m_px;
private:
static void compileTimeAssertions() {
BOOST_STATIC_ASSERT((offsetof(StrNR, m_px) == kExpectedMPxOffset));
static_assert(offsetof(StrNR, m_px) == kExpectedMPxOffset, "");
}
};
+2 -1
Ver Arquivo
@@ -150,8 +150,9 @@ public:
protected:
T* m_px; // raw pointer
private:
static void compileTimeAssertions() {
BOOST_STATIC_ASSERT((offsetof(SmartPtr, m_px) == kExpectedMPxOffset));
static_assert(offsetof(SmartPtr, m_px) == kExpectedMPxOffset, "");
}
};
+1 -1
Ver Arquivo
@@ -3607,7 +3607,7 @@ TranslatorX64::Get() {
template<int Arity>
TCA TranslatorX64::emitNAryStub(X64Assembler& a, CppCall c) {
BOOST_STATIC_ASSERT((Arity < kNumRegisterArgs));
static_assert(Arity < kNumRegisterArgs, "");
// The callNAryStub has already saved these regs on a.
RegSet alreadySaved;