[ADT] Add deduction guide for iterator_range
authorBalazs Benics <benicsbalazs@gmail.com>
Mon, 3 Jul 2023 07:29:37 +0000 (09:29 +0200)
committerBalazs Benics <benicsbalazs@gmail.com>
Mon, 3 Jul 2023 07:29:37 +0000 (09:29 +0200)
commitddbc7620d46f7bed51abc3eb80f51007e88e2732
treec286e16cbe334ceffc5221ac6e4f21169f015485
parent77a599ae5828df343e2aa6acc634fe9acb152c99
[ADT] Add deduction guide for iterator_range

This commit also enhances the container overload constructor so that it
now considers the `begin` and `end` free functions, and performs ADL
lookups to find the best match.

To make this possible, I had to split-off the ADL helper functions from
the STLExtras header so that the iterator_range still remains pretty
cheap to include.

Differential Revision: https://reviews.llvm.org/D152891
llvm/include/llvm/ADT/ADL.h [new file with mode: 0644]
llvm/include/llvm/ADT/STLExtras.h
llvm/include/llvm/ADT/iterator_range.h