[libcxx-commits] [PATCH] D93815: [libc++] [P1065] Constexpr invoke, reference_wrapper, mem_fn, not_fn.

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Dec 25 13:10:12 PST 2020


Quuxplusone created this revision.
Quuxplusone added a reviewer: ldionne.
Quuxplusone added a project: libc++.
Quuxplusone requested review of this revision.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

I believe this is a complete implementation of P1065R2 "Constexpr INVOKE" (Tomasz KamiƄski, Barry Revzin), which was adopted for C++20.
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1065r2.html

This could use more constexpr tests for `std::reference_wrapper<T>`, but the existing tests are extremely constexpr-unfriendly and so I don't want to get into that rabbit-hole today.

I plan to push the refactoring of `ForwardingCallObject` as a separate preliminary commit:

  [libc++] Constexpr-proof some machinery in not_fn.pass.cpp. NFCI.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D93815

Files:
  libcxx/docs/Cxx2aStatusPaperStatus.csv
  libcxx/include/__functional_base
  libcxx/include/functional
  libcxx/include/type_traits
  libcxx/test/std/utilities/function.objects/func.invoke/invoke_constexpr.pass.cpp
  libcxx/test/std/utilities/function.objects/func.memfn/member_data.pass.cpp
  libcxx/test/std/utilities/function.objects/func.memfn/member_function.pass.cpp
  libcxx/test/std/utilities/function.objects/func.memfn/member_function_const.pass.cpp
  libcxx/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D93815.313734.patch
Type: text/x-patch
Size: 44591 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20201225/e1d52e82/attachment-0001.bin>


More information about the libcxx-commits mailing list