[PATCH] D152891: [ADT] Add deduction guide for iterator_range

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 14 15:17:30 PDT 2023


dblaikie added a comment.

In D152891#4420105 <https://reviews.llvm.org/D152891#4420105>, @steakhal wrote:

> I have also considered adding ADL lookup support part of this patch, but that's slightly more complicated if you want to keep the ubiquitously included iterator_range header "small", I cannot simply include STLExtras here to gain the `adl_begin()` and `adl_end()`.
> I have considered to basically "duplicate" the adl_begin and adl_end code, but I'm still not sure.

I'd be more in favor of pulling `adl_begin`/`end` into a separate header and reusing it from both places, if `STLExtras` is too big of a dumping ground.

> To do that, I'd need the `type_traits` header for sure for the SFINAE, which again would bloat this header. It would look something like this that way: F27914971: adl-support.patch <https://reviews.llvm.org/F27914971>

A question would be: How many translation units include `iterator_range` and don't transitively include `type_traits` somewhere along the way anyway?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D152891



More information about the llvm-commits mailing list