Compiler.h: add macro CLANG_OR_GCC_VERSION()

This commit is contained in:
Max Kellermann
2014-11-28 19:09:21 +01:00
committed by Max Kellermann
parent a546bfe7d9
commit ba69ade024
10 changed files with 23 additions and 16 deletions

View File

@@ -75,7 +75,7 @@ TagSet::InsertUnique(const Tag &src, TagType type, const char *value,
else
builder.AddItem(type, value);
CopyTagMask(builder, src, group_mask);
#if defined(__clang__) || GCC_CHECK_VERSION(4,8)
#if CLANG_OR_GCC_VERSION(4,8)
emplace(builder.Commit());
#else
insert(builder.Commit());

View File

@@ -91,7 +91,7 @@ calc_hash(TagType type, const char *p)
return hash ^ type;
}
#if defined(__clang__) || GCC_CHECK_VERSION(4,7)
#if CLANG_OR_GCC_VERSION(4,7)
constexpr
#endif
static inline TagPoolSlot *