[libcxx-commits] [libcxx] [libc++] Refactor __tuple_like and __pair_like (PR #85206)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Mon Mar 18 06:33:42 PDT 2024


philnik777 wrote:

> TBH I am not certain about this refactor. Yes it makes sense from a certain perspective, but at the same time the Standard does define a `pair-like` concept (http://eel.is/c++draft/tuple.syn#concept:pair-like) so I find it better to define our implementation in terms of it.

I am aware of the exposition-only concept. My problem with implementing that 1:1 is that it creates a completely unnecessary dependency on `ranges::subrange`. That would be fine generally, but because it has concepts in the class signature even the forward declaration results in a quite significant dependency chain.

![grafik](https://github.com/llvm/llvm-project/assets/31891256/b0da2a25-c452-4317-96b9-9fba11f56488)

The highlighted part is `__fwd/subrange.h`. (FYI the box left of that is `__fwd/pair.h`)


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


More information about the libcxx-commits mailing list