[libcxx-commits] [PATCH] D127953: [libc++] Mark standard-mandated includes as such

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sun Jun 26 02:27:21 PDT 2022

Mordante added a comment.

In D127953#3610485 <https://reviews.llvm.org/D127953#3610485>, @JamesNagurne wrote:

> In D127953#3610109 <https://reviews.llvm.org/D127953#3610109>, @Mordante wrote:
> I'm not precisely sure what you mean by 'which tool', but here's a reproduction using a cut-down reproduction of the standard test using clang trunk with libc++
> https://godbolt.org/z/jYs7Pz8qj

The example you provided is rightly rejected. You use `std::pair`, which is provided by `<utility>`. The standard doesn't require `<array>` to include `<utility>`. The example also fails without using `std::tuple_size`:


Using the required header instead works:


Alternatively if you intended to get the `std::tuple_size` of `std::array` that works when only using `<array>`:


> Note that the proposal, adds the following clause to tuple.helper
> I can see why the standards body received this request. Since array, pair, etc. also have tuple_size specializations, it's very similar in reasoning to including iterator helpers for STL containers that support iterators.

I'm not saying the LWG issue isn't valid. I've glossed over it and it seems sensible.
I just explained what the normal libc++ procedure is.

> As an aside, I apologize for being vague about the actual suite. I'm not entirely sure what our license says about providing that information to external parties.

I can understand that. But not being able to provide that information makes it harder for me to understand what the real issue is.

  rG LLVM Github Monorepo



More information about the libcxx-commits mailing list