Commit 2abed714 authored by Dominik Charousset's avatar Dominik Charousset

Make disposables comparable (identity check)

parent bbcd12b7
......@@ -13,7 +13,7 @@
namespace caf {
/// Represents a disposable resource.
class CAF_CORE_EXPORT disposable {
class CAF_CORE_EXPORT disposable : detail::comparable<disposable> {
public:
// -- member types -----------------------------------------------------------
......@@ -114,6 +114,13 @@ public:
return pimpl_;
}
// -- comparisons ------------------------------------------------------------
/// Compares the internal pointers.
[[nodiscard]] intptr_t compare(const disposable& other) const noexcept {
return pimpl_.compare(other.pimpl_);
}
private:
intrusive_ptr<impl> pimpl_;
};
......
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