[libcxx-commits] [PATCH] D104942: [libcxx][functional][modular] splices <functional> into modular headers

Christopher Di Bella via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jun 29 20:30:26 PDT 2021


cjdb added inline comments.


================
Comment at: libcxx/include/iterator:559
 #include <__debug>
-#include <__functional_base>
 #include <__iterator/advance.h>
----------------
cjdb wrote:
> Quuxplusone wrote:
> > I suggest (as a general rule) that //removing// header dependencies should be done in a separate commit, so that it's easier to revert if we need to.
> > For example,
> > ```
> > #include <iterator>
> > int main() { typeid(42); }
> > ```
> > currently compiles with libc++, but if you remove `__functional_base` from `iterator`, then (I think) it stops compiling.
> Hmm, yes, good point (that commit is D104982). I'll track down the names from `__functional_base` and re-import them here. Thanks for flagging this.
It was easier to bring `<__functional_base>` back as a zombie. That header can go for real in D104982.


================
Comment at: libcxx/include/module.modulemap:455-462
+      module ranges {
+        module equal_to      { header "__functional/ranges/equal_to.h"      }
+        module greater_equal { header "__functional/ranges/greater_equal.h" }
+        module greater       { header "__functional/ranges/greater.h"       }
+        module less_equal    { header "__functional/ranges/less_equal.h"    }
+        module less          { header "__functional/ranges/less.h"          }
+        module not_equal_to  { header "__functional/ranges/not_equal_to.h"  }
----------------
cjdb wrote:
> Quuxplusone wrote:
> > On the one hand, this looks reasonable; on the other hand, I think we need a discussion about three-level nesting. And ideally a discussion about four-level nesting, //before// someone decides to do it.
> Pinged you on Discord.
Ping again.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104942



More information about the libcxx-commits mailing list