From: Christopher Dykes Date: Mon, 25 Jan 2016 20:21:24 +0000 (-0800) Subject: Initialize LifoSem's padding to allow for its constexpr constructor. X-Git-Tag: deprecate-dynamic-initializer~142 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=ef0c9e476b3484591e8f5a565c476c9c537d7ec9;p=folly.git Initialize LifoSem's padding to allow for its constexpr constructor. 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 --- diff --git a/folly/LifoSem.h b/folly/LifoSem.h index 4aa1cc88..030d58e0 100644 --- a/folly/LifoSem.h +++ b/folly/LifoSem.h @@ -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;