[libcxx-commits] [PATCH] D99041: [libcxx] moves `std::invoke` into its own header

Christopher Di Bella via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sun Mar 21 11:55:05 PDT 2021


cjdb created this revision.
cjdb added reviewers: ldionne, EricWF, Mordante, Quuxplusone, zoecarver, curdeius.
Herald added a subscriber: mgorny.
cjdb requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

Including `<concepts>` in other standard library headers (such as
`<iterator>`) creates circular dependencies due to `<functional>`.
Since `<concepts>` only needs `std::invoke` from `<functional>`, the
easiest, fastest, and cleanest way to eliminate the circular dep is to
move `std::invoke` into its own header.

This has the added advantage of `<concepts>` not transitively importing
`<functional>`.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D99041

Files:
  libcxx/include/CMakeLists.txt
  libcxx/include/__invoke
  libcxx/include/concepts
  libcxx/include/functional
  libcxx/include/module.modulemap

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99041.332173.patch
Type: text/x-patch
Size: 3335 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210321/1e4a3590/attachment.bin>


More information about the libcxx-commits mailing list