Skip to content

Instantly share code, notes, and snippets.

@Apjue
Apjue / utility.hpp
Created December 31, 2017 15:42
C++11 simple non-RTTI variant
#include <type_traits>
template <typename...>
struct IsOneOf
{
static constexpr bool value = false;
};
template <typename T, typename S, typename... Ts>
struct IsOneOf<T, S, Ts...>