cmoon::meta::value_list<Values...>::contains
|
(1) |
Returns true
if item
is a value within this value_list
, returns false
otherwise.
Parameters
item | - | The value to find |
Return value
true
if item
is a value within this value_list
, false
otherwise.
Exceptions
This function never throws exceptions
Complexity
Linear (sizeof...(Values)
)
Example
import cmoon.meta;
int main()
{
using vl = cmoon::meta::value_list<1, 3, 5, 7>;
if constexpr (tl::contains(5))
{
// It has a 5!
}
else
{
// It does not have a 5 :(
}
}