Remove uses of BOOST_STATIC_ASSERT
Ow, my eyes! use static_assert instead.
Esse commit está contido em:
@@ -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
|
||||
|
||||
@@ -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, "");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -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, "");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -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, "");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -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, "");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário