Commit 5f813e67 authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook GitHub Bot

Some static-asserts in Executor::KeepAlive

Summary: [Folly] Some static-asserts in `Executor::KeepAlive`: standard-layout, pointer-size, pointer-align.

Reviewed By: LeeHowes

Differential Revision: D23656740

fbshipit-source-id: ff6c5aa3de01a37144fe8ef0961f06d13938654a
parent f5744f58
......@@ -92,6 +92,11 @@ class Executor {
KeepAlive() = default;
~KeepAlive() {
static_assert(
std::is_standard_layout<KeepAlive>::value, "standard-layout");
static_assert(sizeof(KeepAlive) == sizeof(void*), "pointer size");
static_assert(alignof(KeepAlive) == alignof(void*), "pointer align");
reset();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment