+// Special version that allows to disable address sanitizer on demand.
+template <class T>
+struct BitsTraits<UnalignedNoASan<T>, typename std::enable_if<
+ (std::is_integral<T>::value)>::type> {
+ typedef T UnderlyingType;
+ static T FOLLY_DISABLE_ADDRESS_SANITIZER
+ load(const UnalignedNoASan<T>& x) { return x.value; }
+ static void FOLLY_DISABLE_ADDRESS_SANITIZER
+ store(UnalignedNoASan<T>& x, T v) { x.value = v; }
+ static T FOLLY_DISABLE_ADDRESS_SANITIZER
+ loadRMW(const UnalignedNoASan<T>& x) {
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wuninitialized"
+// make sure we compile without warning on gcc 4.6 with -Wpragmas
+#if __GNUC_PREREQ(4, 7)
+#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
+#endif
+ return x.value;
+#pragma GCC diagnostic pop
+ }
+};
+