flow: ::empty function

This commit is contained in:
Michele Caini
2024-01-30 11:07:00 +01:00
parent 31a91c764b
commit 00ac590e2f

View File

@@ -215,6 +215,14 @@ public:
std::swap(sync_on, other.sync_on);
}
/**
* @brief Returns true if a flow builder contains no tasks, false otherwise.
* @return True if the flow builder contains no tasks, false otherwise.
*/
[[nodiscard]] bool empty() const noexcept {
return vertices.empty();
}
/**
* @brief Returns the number of tasks.
* @return The number of tasks.