summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-05-03 21:25:54 +0200
committerStanislaw Halik <sthalik@misaki.pl>2024-05-05 03:16:22 +0200
commitbacf3d17645e4f79496d42069d9e96bb7ac76497 (patch)
tree2288bba7e2c49616d287dc1f3a4a106674e9006b
parent4d9f93857a7ff67f36bd52d9ae2adddadb142526 (diff)
add iptr todo
-rw-r--r--compat/intrusive-ptr.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/compat/intrusive-ptr.hpp b/compat/intrusive-ptr.hpp
index a997192b..b5cf0d53 100644
--- a/compat/intrusive-ptr.hpp
+++ b/compat/intrusive-ptr.hpp
@@ -54,7 +54,7 @@ struct refcount_access
using counter_type = refcount_traits<Tag, T>::counter_type;
refcount_access() = delete;
- static constexpr auto access(T* ptr) noexcept -> counter_type&;
+ static constexpr auto access(T* ptr) noexcept -> counter_type&; // todo this should return the iptr's control block. it has to contain the original pointer (because the casted ptr (or its base class, when casted to iptr<base>) might not have a virtual dtor), shared count, and (shared+weak) count.
template<typename Y> static constexpr Y* checked_cast(const T* ptr) noexcept; // todo
};
@@ -168,7 +168,7 @@ class basic_iptr final
using ops_t = ::floormat::iptr::refcount_ops<Tag, T>;
static_assert(::floormat::iptr::check_traits<Tag, T>());
- T* _ptr{nullptr};
+ T* _ptr{nullptr}; // todo control block
// todo use std::construct_at as it has a constexpr exception.
// ...but it requires <memory> :( — maybe use an ifdef?