[libcxx-commits] [PATCH] D135016: [libc++] Implement P1169R4 (static operator())

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Oct 6 07:55:44 PDT 2022


philnik added a comment.

In D135016#3829594 <https://reviews.llvm.org/D135016#3829594>, @royjacobson wrote:

> Are the packaged_task changes intentionally missing? I haven't found any deduction guides in source for packaged_task so maybe they're implicit somehow and I miss it.

No, I just missed them somehow. It also seems that we don't have CTAD implemented for `packaged_task` yet, so I did it here.

In D135016#3834176 <https://reviews.llvm.org/D135016#3834176>, @ldionne wrote:

> More generally speaking, I think Eric's point is that we should also add tests that ensure that `std::function` works with a `static operator()`, regardless of CTAD. I agree with that, however I can see why that could be seen as separate from this patch.
>
> But yes, I think we should definitely have runtime tests to check the interaction of `static operator()` and `std::function`.

I would consider this a separate issue, since there are probably other areas where we want to add `static operator()` tests.



================
Comment at: libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/ctad.static.compile.pass.cpp:10
+// UNSUPPORTED: c++03, c++11, c++14
+// UNSUPPORTED: (c++17 || c++20) && !stdlib=libc++
+// ADDITIONAL_COMPILE_FLAGS: -Wno-c++2b-extensions
----------------
ldionne wrote:
> Why do we support this pre-C++23?
Because my plan is to use `static operator()` for the implementation of the ranges algorithms, since it improves code gen.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D135016/new/

https://reviews.llvm.org/D135016



More information about the libcxx-commits mailing list