diff --git a/esputils.h b/esputils.h index ab97b49..0517768 100644 --- a/esputils.h +++ b/esputils.h @@ -220,5 +220,12 @@ struct EspOverload : EspConstOverload, EspNonConstOverload template constexpr __attribute__((__unused__)) EspOverload espOverload = {}; template constexpr __attribute__((__unused__)) EspConstOverload espConstOverload = {}; template constexpr __attribute__((__unused__)) EspNonConstOverload espNonConstOverload = {}; + +template +bool is_in(First &&first, T && ... t) +{ + return ((first == t) || ...); +} + } // namespace } // namespace espcpputils