Initialize LifoSem's padding to allow for its constexpr constructor.
authorChristopher Dykes <cdykes@fb.com>
Mon, 25 Jan 2016 20:21:24 +0000 (12:21 -0800)
committerfacebook-github-bot-4 <folly-bot@fb.com>
Mon, 25 Jan 2016 21:20:25 +0000 (13:20 -0800)
Summary: MSVC correctly gives an error about the constexpr constructor not initializing all members.

Reviewed By: yfeldblum

Differential Revision: D2856806

fb-gh-sync-id: cef97639906dd3c39e3d3dc2ba939021e15edcb9

folly/LifoSem.h

index 4aa1cc888209479a49d66617e43222a6c8aec8f7..030d58e0b86506a1be72e6dfb3175c409ee75973 100644 (file)
@@ -323,7 +323,7 @@ struct LifoSemBase {
 
   /// Constructor
   constexpr explicit LifoSemBase(uint32_t initialValue = 0)
-    : head_(LifoSemHead::fresh(initialValue)) {}
+      : head_(LifoSemHead::fresh(initialValue)), padding_() {}
 
   LifoSemBase(LifoSemBase const&) = delete;
   LifoSemBase& operator=(LifoSemBase const&) = delete;