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