[libcxx-commits] [PATCH] D99044: [libc++] Split out `<__functional_{ops, search}>` from `<functional>`. NFCI

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Mar 29 06:52:01 PDT 2021


Quuxplusone updated this revision to Diff 333851.
Quuxplusone added a comment.

Use `__invoke` instead of `invoke`, as a global preference. (`__invoke` comes from `<type_traits>`, which means we don't need to include `<functional>`. After this patch, `git grep '::invoke('` returns no results, and I think we can easily keep it that way.)

Old dependency graph: https://i.imgur.com/o5Tu2Yc.png
New dependency graph: https://i.imgur.com/P6D8hEH.png

(Btw, I looked at what it would take to move all the `invoke/__invoke` stuff into its own header, and that turned out to be pretty icky, because `result_of` depends on `__invoke_result_t`, and `result_of` is //mandated// to be in `<type_traits>`. So in order to put `invoke` in the same header as `__invoke`, we'd need to either put `invoke` in `<type_traits>`, or split out `__invoke` into a header that's even lower-level than `<type_traits>`, e.g. "`<type_traits>` includes `<__functional_invoke>` includes `<__type_traits_base>`." That's too Byzantine for me.)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99044

Files:
  libcxx/include/CMakeLists.txt
  libcxx/include/__functional_base
  libcxx/include/__functional_ops
  libcxx/include/__functional_search
  libcxx/include/algorithm
  libcxx/include/concepts
  libcxx/include/experimental/coroutine
  libcxx/include/experimental/propagate_const
  libcxx/include/experimental/simd
  libcxx/include/ext/hash_map
  libcxx/include/ext/hash_set
  libcxx/include/functional
  libcxx/include/map
  libcxx/include/memory
  libcxx/include/module.modulemap
  libcxx/include/mutex
  libcxx/include/numeric
  libcxx/include/optional
  libcxx/include/queue
  libcxx/include/set
  libcxx/include/thread
  libcxx/include/unordered_map
  libcxx/include/unordered_set
  libcxx/include/valarray
  libcxx/include/variant

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99044.333851.patch
Type: text/x-patch
Size: 52351 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210329/96f950f3/attachment-0001.bin>


More information about the libcxx-commits mailing list