ML Reference
ml::Is< T > Struct Template Reference

In combination with the in function, it returns true if a passed value is in the set of possible values. More...

#include <mlContainerHelpers.h>

Public Member Functions

template<typename U>
constexpr bool in (U a)
template<class Arg, class... Args>
constexpr bool in (Arg a, Args... args)

Public Attributes

d_

Detailed Description

template<class T>
struct ml::Is< T >

In combination with the in function, it returns true if a passed value is in the set of possible values.

For example: if (is(value).in(option1, option2, option3)) { ... } Intended to be used for enumerated values.

Definition at line 26 of file mlContainerHelpers.h.

Member Function Documentation

◆ in() [1/2]

template<class T>
template<class Arg, class... Args>
bool ml::Is< T >::in ( Arg a,
Args... args )
inlineconstexpr

Definition at line 35 of file mlContainerHelpers.h.

References in().

◆ in() [2/2]

template<class T>
template<typename U>
bool ml::Is< T >::in ( U a)
inlineconstexpr

Definition at line 30 of file mlContainerHelpers.h.

References d_.

Referenced by in().

Member Data Documentation

◆ d_

template<class T>
T ml::Is< T >::d_

Definition at line 28 of file mlContainerHelpers.h.

Referenced by in().


The documentation for this struct was generated from the following file: