[libcxx-commits] [libcxx] [libc++] P2944R3: Constrained comparisions - `optional` (PR #144249)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jul 2 22:53:31 PDT 2025
================
@@ -30,6 +30,13 @@ template <class _Tp, class _Up>
struct __is_core_convertible<_Tp, _Up, decltype(static_cast<void (*)(_Up)>(0)(static_cast<_Tp (*)()>(0)()))>
: true_type {};
+#if _LIBCPP_STD_VER >= 17
+
+template <class _Tp>
----------------
frederick-vs-ja wrote:
I think it's better to introduce `__is_core_convertible_v` first and implement `__is_core_convertible` with it, then use `__is_core_convertible_v<decltype(...), bool>` in the constraints.
https://github.com/llvm/llvm-project/pull/144249
More information about the libcxx-commits
mailing list