msvc packed attribute translation
[folly.git] / folly / Bits.h
index 020955eb996802a3febdcf83894a5b74fd8a695b..78160533959ab4b7b43b84e8917ef9a20da907d7 100644 (file)
@@ -524,6 +524,7 @@ template <class T, class Enable=void> struct Unaligned;
 /**
  * Representation of an unaligned value of a POD type.
  */
+FOLLY_PACK_PUSH
 template <class T>
 struct Unaligned<
     T,
@@ -531,7 +532,8 @@ struct Unaligned<
   Unaligned() = default;  // uninitialized
   /* implicit */ Unaligned(T v) : value(v) { }
   T value;
-} __attribute__((packed));
+} FOLLY_PACK_ATTR;
+FOLLY_PACK_POP
 
 /**
  * Read an unaligned value of type T and return it.