Summary: It's not safe because of how it manipulates the linked list. The intended usage is to declare it locally on the stack
Reviewed By: yfeldblum
Differential Revision:
D5267507
fbshipit-source-id:
07a55eaee2c6a266bb233432f6a3383236594195
+ Safety(const Safety&) = delete;
+ Safety(Safety&& goner) = delete;
+ Safety& operator=(const Safety&) = delete;
+ Safety& operator=(Safety&&) = delete;
+
bool destroyed() const {
return prev_ == nullptr;
}
bool destroyed() const {
return prev_ == nullptr;
}