summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/include/llvm/Support/type_traits.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/include/llvm/Support/type_traits.h b/llvm/include/llvm/Support/type_traits.h
index 71f7655e2ef..5f799b850de 100644
--- a/llvm/include/llvm/Support/type_traits.h
+++ b/llvm/include/llvm/Support/type_traits.h
@@ -49,6 +49,17 @@ struct is_class
enum { value = sizeof(char) == sizeof(dont_use::is_class_helper<T>(0)) };
};
+/// \brief Metafunction that determines whether the two given types are
+/// equivalent.
+template<typename T, typename U>
+struct is_same {
+ static const bool value = false;
+};
+
+template<typename T>
+struct is_same<T, T> {
+ static const bool value = true;
+};
// enable_if_c - Enable/disable a template based on a metafunction
template<bool Cond, typename T = void>
OpenPOWER on IntegriCloud