Assert that MicroSpinLock is a POD type
authorChristopher Dykes <cdykes@fb.com>
Wed, 1 Jun 2016 22:36:26 +0000 (15:36 -0700)
committerFacebook Github Bot 6 <facebook-github-bot-6-bot@fb.com>
Wed, 1 Jun 2016 22:38:32 +0000 (15:38 -0700)
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

index 1318d9e9f0e02d9445d17553cb4e722674eacfec..4a691fd1ff54cb5da397f926c01e7efc25d7367a 100644 (file)
@@ -105,6 +105,9 @@ struct MicroSpinLock {
                                                         std::memory_order_relaxed);
   }
 };
+static_assert(
+    std::is_pod<MicroSpinLock>::value,
+    "MicroSpinLock must be kept a POD type.");
 
 //////////////////////////////////////////////////////////////////////