[libcxx-commits] [libcxx] [libc++][unique_ptr] Implement LWG 4144: Disallow unique_ptr<T&, D> (PR #209018)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jul 13 01:55:20 PDT 2026
================
@@ -100,6 +101,12 @@ inline const bool __can_dereference = false;
template <class _Tp>
inline const bool __can_dereference<_Tp, decltype((void)*std::declval<_Tp>())> = true;
+template <class _Tp, class = void>
+inline const bool __is_pointable = false;
----------------
philnik777 wrote:
I'm not a huge fan of this name. Something more descriptive like `__can_be_pointed_to` or `__can_add_pointer`?
Also, can we write this as `!is_same<__add_pointer_t<_Tp>, _Tp>`?
I'd love to just write `requires { _Tp*; }` without giving this a name at all, but unfortunately we don't like in that world (yet).
https://github.com/llvm/llvm-project/pull/209018
More information about the libcxx-commits
mailing list