Function Set.opBinaryRight
in operator.
bool opBinaryRight(string op : "in", U)
(
auto const ref U value
) const
if (ifTestable!(U, (a) => T .init == a));
Parameters
Name | Description |
---|---|
U | Type comparable with the element type, used for the lookup. |
value | Element to be searched for. |
Returns
true if the given element exists in the container, false otherwise.
Example
Set!int set;
assert(5 !in set);
set .insert(5);
assert(5 in set);
assert(8 !in set);