From df1605c9b1e43fcb9f92b4be76360e2e10a67a19 Mon Sep 17 00:00:00 2001 From: Martchus Date: Mon, 30 Jan 2017 00:08:35 +0100 Subject: [PATCH] Add trait to detect template specialization Useful to check for std::tuple --- misc/traits.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/misc/traits.h b/misc/traits.h index 1c563fa..3236f58 100644 --- a/misc/traits.h +++ b/misc/traits.h @@ -20,28 +20,29 @@ using Not = Bool; template struct Any : Bool {}; - template struct Any : Conditional, Any > {}; template struct All : Bool {}; - template struct All : Conditional, Bool > {}; template using EnableIf = typename std::enable_if::value, Detail::Enabler>::type; - template using DisableIf = typename std::enable_if::value, Detail::Enabler>::type; template using EnableIfAny = typename std::enable_if::value, Detail::Enabler>::type; - template using DisableIfAny = typename std::enable_if::value, Detail::Enabler>::type; +template class Template> +struct IsSpecializationOf : Bool {}; +template