[libcxx-commits] [libcxx] [libc++] Make forward_list constexpr as part of P3372R3 (PR #129435)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jun 4 09:27:52 PDT 2025


================
@@ -302,6 +302,14 @@ concept __resettable_smart_pointer_with_args = requires(_Smart __s, _Pointer __p
 
 #endif
 
+template <class _PtrTo, class _PtrFrom>
+_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI _PtrTo __static_fancy_pointer_cast(const _PtrFrom& __p) {
----------------
philnik777 wrote:

I guess so. I think my main question is whether this utility is still needed after that patch. If not, I think I'd like this patch to be rebased on the other instead of adding a utility we know for a fact is removed by a follow-up patch. That would simplify this patch, which I think is quite important. The "constexpr everything" patches are really difficult to go through due to all the changes (even though none of them are complicated), so every bit of simplification makes it significantly easier to look at.

https://github.com/llvm/llvm-project/pull/129435


More information about the libcxx-commits mailing list