[libcxx-commits] [libcxx] [libc++][functional] Implement `not_fn<NTTP>` (PR #86133)
Jakub Mazurkiewicz via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Mar 25 02:05:51 PDT 2024
================
@@ -48,6 +50,27 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 auto not_fn(_Fn&& __f) {
#endif // _LIBCPP_STD_VER >= 17
+#if _LIBCPP_STD_VER >= 26
+
+template <auto _Fn>
+struct __nttp_not_fn_t {
+ template <class... _Args>
+ _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Args&&... __args) const
----------------
JMazurkiewicz wrote:
Initially, I've made `operator()` static but due to the reason previously mentioned
> volatile values can be rejected by not using static
I've made it member function again. For now, I'm going to leave it as-is and wait for maintainers' comment.
https://github.com/llvm/llvm-project/pull/86133
More information about the libcxx-commits
mailing list