You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
437 B
19 lines
437 B
#pragma once |
|
|
|
#include "utils/attributes.h" |
|
|
|
namespace devilution { |
|
|
|
template <typename V, typename X, typename... Xs> |
|
DVL_ALWAYS_INLINE constexpr bool IsAnyOf(const V &v, X x, Xs... xs) |
|
{ |
|
return v == x || ((v == xs) || ...); |
|
} |
|
|
|
template <typename V, typename X, typename... Xs> |
|
DVL_ALWAYS_INLINE constexpr bool IsNoneOf(const V &v, X x, Xs... xs) |
|
{ |
|
return v != x && ((v != xs) && ...); |
|
} |
|
|
|
} // namespace devilution
|
|
|