[libcxx-commits] [libcxx] [libc++][modules] Remove a dependency of __type_traits/invoke.h on __utility (PR #106795)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Wed Sep 4 10:26:30 PDT 2024


ldionne wrote:

> I think that should work and avoids the dependency problem. The module names could probably be better.

This is basically equivalent to moving `__utility/forward.h` into `__type_traits`. I could also do that, but it feels like `forward.h` doesn't belong there.

Alternatively, your suggestion can be seen as:

```
module core {
  module type_traits { ... }
  module basic_utilities {
    header "__utility/forward.h"
    header "__utility/declval.h"
    header "__utility/move.h"
  }
}
```

But then that begs the question of defining what the `core` module is, which seems a bit arbitrary to me. It would also mean that our directory hierarchy does not mirror the modulemap anymore, which I can live with but certainly would find nice if we could have that property.

https://github.com/llvm/llvm-project/pull/106795


More information about the libcxx-commits mailing list