Bug 1319016 - Part2 - Make IsVariant class use IntegralConstant as true false type.
MozReview-Commit-ID: G4ohbnUy049
--- a/mfbt/Variant.h
+++ b/mfbt/Variant.h
@@ -44,26 +44,20 @@ struct MaxSizeOf<T>
// `mozilla::EnableIf` to catch passing non-variant types to `Variant::is<T>()`
// and friends at compile time, rather than at runtime. It ensures that the
// given type `Needle` is one of the types in the set of types `Haystack`.
template<typename Needle, typename... Haystack>
struct IsVariant;
template<typename Needle>
-struct IsVariant<Needle>
-{
- static const bool value = false;
-};
+struct IsVariant<Needle> : FalseType {};
template<typename Needle, typename... Haystack>
-struct IsVariant<Needle, Needle, Haystack...>
-{
- static const bool value = true;
-};
+struct IsVariant<Needle, Needle, Haystack...> : TrueType {};
template<typename Needle, typename T, typename... Haystack>
struct IsVariant<Needle, T, Haystack...> : public IsVariant<Needle, Haystack...> { };
/// SelectVariantTypeHelper is used in the implementation of SelectVariantType.
template<typename T, typename... Variants>
struct SelectVariantTypeHelper;