Added FOLLY_ALIGNED(), to allow aligning on MSVC as well
[folly.git] / folly / Arena.h
index 00caa947abba291e2bdc07e1e3b7318ed7ff1bba..530e0505ed4933df75fd07367acbe021c6ce9490 100644 (file)
@@ -132,7 +132,7 @@ class Arena {
   typedef boost::intrusive::slist_member_hook<
     boost::intrusive::tag<Arena>> BlockLink;
 
-  struct Block {
+  struct FOLLY_ALIGNED_MAX Block {
     BlockLink link;
 
     // Allocate a block with at least size bytes of storage.
@@ -150,9 +150,7 @@ class Arena {
    private:
     Block() = default;
     ~Block() = default;
-  } __attribute__((__aligned__));
-  // This should be alignas(std::max_align_t) but neither alignas nor
-  // max_align_t are supported by gcc 4.6.2.
+  };
 
  public:
   static constexpr size_t kDefaultMinBlockSize = 4096 - sizeof(Block);