[all-commits] [llvm/llvm-project] da0d81: [ADT] Fix definition of `adl_begin`/`adl_end` and ...

Jakub Kuderski via All-commits all-commits at lists.llvm.org
Mon Feb 27 17:31:43 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: da0d816567e229da01b5663e8587114d469e2b0b
      https://github.com/llvm/llvm-project/commit/da0d816567e229da01b5663e8587114d469e2b0b
  Author: Jakub Kuderski <kubak at google.com>
  Date:   2023-02-27 (Mon, 27 Feb 2023)

  Changed paths:
    M llvm/include/llvm/ADT/STLExtras.h
    M llvm/unittests/ADT/STLExtrasTest.cpp

  Log Message:
  -----------
  [ADT] Fix definition of `adl_begin`/`adl_end` and `Iter`/`ValueOfRange`

- Make `IterOfRange` and `ValueOfRange` work with types that require
  custom `begin`/`end` functions.
- Allow for `adl_begin`/`adl_end` to be used in constant-evaluated
  contexts.
- Use SFINAE-friendly trailing return type deductions `adl_begin`/`adl_end` so that they are useable in template argument deduction.
- Add missing documentation comments.

This is required for future work in https://reviews.llvm.org/D144503.

Reviewed By: dblaikie, zero9178

Differential Revision: https://reviews.llvm.org/D144583




More information about the All-commits mailing list