Commit 0575b836 authored by Gauthier Quesnel's avatar Gauthier Quesnel
Browse files

core: add a match template function

parent 81785022
......@@ -127,6 +127,13 @@ is_status_equal(status s, Args... args) noexcept
return ((s == args) || ... || false);
}
template<typename T, typename... Args>
constexpr bool
match(const T &s, Args... args) noexcept
{
return ((s == args) || ... || false);
}
#ifndef NDEBUG
#if (defined(__i386__) || defined(__x86_64__)) && defined(__GNUC__) && \
__GNUC__ >= 2
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment