summaryrefslogtreecommitdiffhomepage
path: root/compat
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-05-07 13:59:09 +0200
committerStanislaw Halik <sthalik@misaki.pl>2024-05-07 13:59:09 +0200
commit93d26c0f5df67236d21b51f71bc3bb781687df51 (patch)
tree44f3036357753cd549189e4737d716758e65aad5 /compat
parent220786f90da4b7e23727ef35eab5166fc23e6355 (diff)
d
Diffstat (limited to 'compat')
-rw-r--r--compat/intrusive-ptr.hpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/compat/intrusive-ptr.hpp b/compat/intrusive-ptr.hpp
index 5f05777c..83cb3527 100644
--- a/compat/intrusive-ptr.hpp
+++ b/compat/intrusive-ptr.hpp
@@ -50,7 +50,7 @@ struct refcount_ops
template<typename Tag, typename T>
struct refcount_access
{
- using counter_type = refcount_traits<Tag, T>::counter_type;
+ using counter_type = typename refcount_traits<Tag, T>::counter_type;
refcount_access() = delete;
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.
@@ -169,9 +169,6 @@ class basic_iptr final
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?
-
public:
constexpr basic_iptr() noexcept;
constexpr basic_iptr(std::nullptr_t) noexcept;
@@ -184,7 +181,7 @@ public:
constexpr ~basic_iptr() noexcept;
template<typename... Ts> requires std::is_constructible_v<T, Ts&&...>
- constexpr basic_iptr(InPlaceInitT, Ts&&... args) // NOLINT(*-missing-std-forward)
+ explicit constexpr basic_iptr(InPlaceInitT, Ts&&... args) // NOLINT(*-missing-std-forward)
noexcept(std::is_nothrow_constructible_v<T, Ts&&...>);
constexpr inline void reset() noexcept;