From 404aa26b26eb62c57daac8246159220eb173ae94 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Tue, 13 Oct 2009 21:17:00 +0000 Subject: [PATCH] Add is_same type trait git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84029 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Support/type_traits.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/llvm/Support/type_traits.h b/include/llvm/Support/type_traits.h index 71f7655e2ef..5f799b850de 100644 --- a/include/llvm/Support/type_traits.h +++ b/include/llvm/Support/type_traits.h @@ -49,6 +49,17 @@ struct is_class enum { value = sizeof(char) == sizeof(dont_use::is_class_helper(0)) }; }; +/// \brief Metafunction that determines whether the two given types are +/// equivalent. +template +struct is_same { + static const bool value = false; +}; + +template +struct is_same { + static const bool value = true; +}; // enable_if_c - Enable/disable a template based on a metafunction template