[PATCH] D146061: [ADT] Make llvm::is_contained call member `contains` when available

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 14 13:31:33 PDT 2023


dblaikie added a comment.

In D146061#4193697 <https://reviews.llvm.org/D146061#4193697>, @kuhar wrote:

> This is also consistent with how new C++ range functions are defined, e.g., https://en.cppreference.com/w/cpp/ranges/size that calls member `.size` when available and does iterator subtraction otherwise.

Fair - that a bunch of free function ranges functions are like this, delegating to members where available maybe tilts things in that direction.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D146061



More information about the llvm-commits mailing list