summaryrefslogtreecommitdiffhomepage
path: root/compat/borrowed-ptr.inl
diff options
context:
space:
mode:
Diffstat (limited to 'compat/borrowed-ptr.inl')
-rw-r--r--compat/borrowed-ptr.inl12
1 files changed, 8 insertions, 4 deletions
diff --git a/compat/borrowed-ptr.inl b/compat/borrowed-ptr.inl
index dfc112c7..b31326e7 100644
--- a/compat/borrowed-ptr.inl
+++ b/compat/borrowed-ptr.inl
@@ -11,7 +11,7 @@ namespace floormat {
template<typename T>
template<typename... Ts>
-requires std::is_constructible_v<std::remove_const_t<T>, Ts&&...>
+//requires std::is_constructible_v<std::remove_const_t<T>, Ts&&...>
bptr<T>::bptr(InPlaceInitT, Ts&&... args) noexcept:
bptr{ new std::remove_const_t<T>{ forward<Ts>(args)... } }
{}
@@ -160,9 +160,13 @@ template<typename T> bool bptr<T>::operator==(const std::nullptr_t&) const noexc
template<typename T>
std::strong_ordering bptr<T>::operator<=>(const bptr<const T>& other) const noexcept
-{
- return get() <=> other.get();
-}
+{ return get() <=> other.get(); }
+
+template<typename T> std::strong_ordering bptr<T>::operator<=>(const bptr<T>& other) const noexcept requires (!std::is_const_v<T>)
+{ return get() <=> other.get(); }
+
+template<typename T> std::strong_ordering bptr<T>::operator<=>(const std::nullptr_t&) const noexcept
+{ return get() <=> (T*)nullptr; }
template<typename T> void bptr<T>::swap(bptr& other) noexcept { floormat::swap(blk, other.blk); }