From 708998eb51fe2ce2da91ecd54a106240e51f3d28 Mon Sep 17 00:00:00 2001 From: Christopher Dykes Date: Wed, 1 Jun 2016 15:36:26 -0700 Subject: [PATCH] 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 --- folly/MicroSpinLock.h | 3 +++ 1 file changed, 3 insertions(+) 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."); ////////////////////////////////////////////////////////////////////// -- 2.34.1