[llvm-branch-commits] [llvm-branch] r85317 - /llvm/branches/Apple/Leela/include/llvm/Support/type_traits.h

Bill Wendling isanbard at gmail.com
Tue Oct 27 14:33:54 PDT 2009


Author: void
Date: Tue Oct 27 16:33:53 2009
New Revision: 85317

URL: http://llvm.org/viewvc/llvm-project?rev=85317&view=rev
Log:
$ svn merge -c 84029 https://llvm.org/svn/llvm-project/llvm/trunk
--- Merging r84029 into '.':
U    include/llvm/Support/type_traits.h


Modified:
    llvm/branches/Apple/Leela/include/llvm/Support/type_traits.h

Modified: llvm/branches/Apple/Leela/include/llvm/Support/type_traits.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Leela/include/llvm/Support/type_traits.h?rev=85317&r1=85316&r2=85317&view=diff

==============================================================================
--- llvm/branches/Apple/Leela/include/llvm/Support/type_traits.h (original)
+++ llvm/branches/Apple/Leela/include/llvm/Support/type_traits.h Tue Oct 27 16:33:53 2009
@@ -49,6 +49,17 @@
     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>





More information about the llvm-branch-commits mailing list