[libcxx-commits] [libcxx] [libc++] Fix constant_wrapper::operator() (PR #193573)

via libcxx-commits libcxx-commits at lists.llvm.org
Sat Apr 25 02:24:34 PDT 2026


================
@@ -276,62 +278,58 @@ struct __cw_operators {
   }
 };
 
+template <const auto& __callbale, class... _Args>
+concept __constexpr_callable = (__constexpr_param<remove_cvref_t<_Args>> && ...) && requires {
+  typename constant_wrapper<std::invoke(__callbale, remove_cvref_t<_Args>::value...)>;
+};
+
+template <const auto& __obj, class... _Args>
+concept __constexpr_indexable = (__constexpr_param<remove_cvref_t<_Args>> && ...) && requires {
+  typename constant_wrapper<__obj[remove_cvref_t<_Args>::value...]>;
+};
+
 template <__cw_fixed_value _Xp, class>
----------------
huixie90 wrote:

As discussed, this template parameter isn't really the "Value", it is the intermediate wrapper "cw fixed value". 

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


More information about the libcxx-commits mailing list