[PATCH] D144583: [ADT] Fix definition of `adl_begin`/`adl_end` and `Iter`/`ValueOfRange`

Jakub Kuderski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 22 11:25:44 PST 2023


kuhar created this revision.
kuhar added reviewers: dblaikie, kazu, zero9178, mehdi_amini, zturner, antiagainst, beanz.
Herald added a subscriber: hanchung.
Herald added a project: All.
kuhar requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

- 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.
- Fix `adl_begin`/`adl_end` so that they work with incomplete types. These require trailing return types, per. 7.5.2.: >  In a trailing-return-type, the class being defined is not required to be complete for purposes of class member access. Class members declared later are not visible.
- Add missing documentation comments.

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D144583

Files:
  llvm/include/llvm/ADT/STLExtras.h
  llvm/unittests/ADT/STLExtrasTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144583.499599.patch
Type: text/x-patch
Size: 5453 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230222/92942cb7/attachment.bin>


More information about the llvm-commits mailing list