From: Christopher Dykes Date: Wed, 1 Jun 2016 22:36:26 +0000 (-0700) Subject: Assert that MicroSpinLock is a POD type X-Git-Tag: 2016.07.26~170 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=708998eb51fe2ce2da91ecd54a106240e51f3d28;p=folly.git Assert that MicroSpinLock is a POD type Summary: Because if it's not, all hell will break lose (apparently). Reviewed By: meyering Differential Revision: D3373061 fbshipit-source-id: f08a863d1bacadeeff9d9cea041f399f136cfc74 --- diff --git a/folly/MicroSpinLock.h b/folly/MicroSpinLock.h index 1318d9e9..4a691fd1 100644 --- a/folly/MicroSpinLock.h +++ b/folly/MicroSpinLock.h @@ -105,6 +105,9 @@ struct MicroSpinLock { std::memory_order_relaxed); } }; +static_assert( + std::is_pod::value, + "MicroSpinLock must be kept a POD type."); //////////////////////////////////////////////////////////////////////