diff options
Diffstat (limited to 'compat/borrowed-ptr.inl')
-rw-r--r-- | compat/borrowed-ptr.inl | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/compat/borrowed-ptr.inl b/compat/borrowed-ptr.inl index 8faa4d4e..40079377 100644 --- a/compat/borrowed-ptr.inl +++ b/compat/borrowed-ptr.inl @@ -151,6 +151,15 @@ bptr<T>::bptr(const bptr<Y>& other, std::nullptr_t) noexcept: template<typename T> template<typename Y> +requires std::is_convertible_v<T*, const bptr_base*> +bptr<T>::bptr(bptr<Y>&& other, std::nullptr_t) noexcept: + blk{other.blk} +{ + other.blk = nullptr; +} + +template<typename T> +template<typename Y> bptr<T>& bptr<T>::_copy_assign(const bptr<Y>& other) noexcept { if (blk != other.blk) @@ -166,15 +175,6 @@ bptr<T>& bptr<T>::_copy_assign(const bptr<Y>& other) noexcept template<typename T> template<typename Y> -requires std::is_convertible_v<T*, const bptr_base*> -bptr<T>::bptr(bptr<Y>&& other, std::nullptr_t) noexcept: - blk{other.blk} -{ - other.blk = nullptr; -} - -template<typename T> -template<typename Y> bptr<T>& bptr<T>::_move_assign(bptr<Y>&& other) noexcept { if (blk) |