constexpr Range(Iter start, size_t size)
: b_(start), e_(start + size) { }
-# if !defined(__clang__) || __clang_major__ > 3 || \
- (__clang_major__ == 3 && __clang_minor__ > 6)
- // Clang 3.6 crashes on this line
+# if !__clang__ || __CLANG_PREREQ(3, 7) // Clang 3.6 crashes on this line
/* implicit */ Range(std::nullptr_t) = delete;
# endif
#include <stdexcept>
#include <folly/ExceptionWrapper.h>
#include <folly/Conv.h>
+#include <folly/Portability.h>
using namespace folly;
EXPECT_EQ(ew2.class_name(), "IntException");
ew2.with_exception<AbstractIntException>([&](AbstractIntException& ie) {
EXPECT_EQ(ie.getInt(), expected);
-#if defined __clang__ && (__clang_major__ > 3 || __clang_minor__ >= 6)
+#if __CLANG_PREREQ(3, 6)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wunevaluated-expression"
#endif
EXPECT_EQ(typeid(ie), typeid(IntException));
-#if defined __clang__ && (__clang_major__ > 3 || __clang_minor__ >= 6)
+#if __CLANG_PREREQ(3, 6)
# pragma clang diagnostic pop
#endif
});