16 inline namespace _V1 {
17 namespace ext::intel::experimental::esimd {
21 template <
typename...>
struct is_one_of {
22 static constexpr
bool value =
false;
25 template <
typename Checked,
typename First,
typename... Other>
26 struct is_one_of<Checked, First, Other...> {
27 static constexpr
bool value = std::is_same_v<std::remove_const_t<Checked>,
28 std::remove_const_t<First>> ||
29 is_one_of<Checked, Other...>::value;
31 template <
typename Checked,
typename... T>
32 inline constexpr
bool is_one_of_v = is_one_of<Checked, T...>::value;
36 template <
typename enumClass, enumClass... E>
struct is_one_of_enum {
37 static constexpr
bool value =
false;
40 template <
typename enumClass, enumClass Checked, enumClass First,
42 struct is_one_of_enum<enumClass, Checked, First, Else...> {
43 static constexpr
bool value =
44 (Checked == First) || is_one_of_enum<enumClass, Checked, Else...>::value;
46 template <
typename enumClass, enumClass... T>
47 inline constexpr
bool is_one_of_enum_v = is_one_of_enum<enumClass, T...>::value;