Commit 1ab6a01f authored by Pranjal Raihan's avatar Pranjal Raihan Committed by Facebook GitHub Bot

Use compact_once_flag for DelayedInit

Summary: Use the 1 byte version of `once_flag` such that there is no more memory overhead than `Optional`.

Reviewed By: andriigrynenko

Differential Revision: D25909346

fbshipit-source-id: 1bb2f41200917ba58b20815bfafe3314137e9680
parent 6808ac5a
......@@ -153,7 +153,7 @@ struct DelayedInit {
union {
std::remove_const_t<T> value;
};
once_flag init;
compact_once_flag init;
StorageTriviallyDestructible() {}
};
......@@ -162,7 +162,7 @@ struct DelayedInit {
union {
std::remove_const_t<T> value;
};
once_flag init;
compact_once_flag init;
StorageNonTriviallyDestructible() {}
~StorageNonTriviallyDestructible() {
......
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