[ADT] Relax type requirements for `is_contained`
authorJakub Kuderski <kubak@google.com>
Tue, 21 Feb 2023 18:05:01 +0000 (13:05 -0500)
committerJakub Kuderski <kubak@google.com>
Tue, 21 Feb 2023 18:12:50 +0000 (13:12 -0500)
commit75272d5c1299db93aa619fc9e616832f578726c2
tree9ea86c49ad457dbdb86245a633b0dfce0407fca3
parent9168c98553ac9a1f8e8b87006f9b1b3f23955beb
[ADT] Relax type requirements for `is_contained`

- Do not require both the `Set` and `Element` to be exactly the same type and, instead, only require them to be comparable.
- Do not require `Element` to be copyable.
- Add missing documentation comment.

Reviewed By: beanz

Differential Revision: https://reviews.llvm.org/D144416
llvm/include/llvm/ADT/STLExtras.h
llvm/unittests/ADT/STLExtrasTest.cpp