mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 01:18:36 +02:00
Lifetime: Allow checking for empty lifetimes
This commit is contained in:
@@ -25,6 +25,10 @@ public:
|
||||
rhs.fnOnDeath = std::function<void(void)>();
|
||||
return *this;
|
||||
}
|
||||
|
||||
// Allow checking for empty Lifetimes
|
||||
bool empty() const { return fnOnDeath.operator bool(); }
|
||||
operator bool() const { return empty(); }
|
||||
private:
|
||||
std::function<void(void)> fnOnDeath;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user