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

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 14 09:50:30 PDT 2023


nikic added a comment.

> I also considered detecting member contains and triggering a
> static_assert instead, but decided against it because it's just as easy
> to do the right thing and call .contains.

I think I would prefer this option, so we keep the ability to distinguish O(1) contains from O(n) is_contained at a glance.


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