[llvm] r206259 - [Allocator] Fix r206256 which got the enabling case backwards on these

Chandler Carruth chandlerc at gmail.com
Tue Apr 15 01:14:48 PDT 2014


Author: chandlerc
Date: Tue Apr 15 03:14:48 2014
New Revision: 206259

URL: http://llvm.org/viewvc/llvm-project?rev=206259&view=rev
Log:
[Allocator] Fix r206256 which got the enabling case backwards on these
overloads. This doesn't matter *that* much yet, but it will in
a subsequent patch. I had tested the original pattern, but not my
attempt to pacify MSVC. This at least appears to work. Still fixing the
rest of the fallout in the final patch that uses these overloads, but it
will follow shortly.

Modified:
    llvm/trunk/include/llvm/Support/Allocator.h

Modified: llvm/trunk/include/llvm/Support/Allocator.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Allocator.h?rev=206259&r1=206258&r2=206259&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/Allocator.h (original)
+++ llvm/trunk/include/llvm/Support/Allocator.h Tue Apr 15 03:14:48 2014
@@ -99,7 +99,7 @@ public:
   /// \brief Deallocate space for one object without destroying it.
   template <typename T>
   typename std::enable_if<
-      std::is_same<typename std::remove_cv<T>::type, void>::value, void>::type
+      !std::is_same<typename std::remove_cv<T>::type, void>::value, void>::type
   Deallocate(T *Ptr) {
     Deallocate(static_cast<const void *>(Ptr));
   }
@@ -107,7 +107,7 @@ public:
   /// \brief Allocate space for an array of objects without constructing them.
   template <typename T>
   typename std::enable_if<
-      std::is_same<typename std::remove_cv<T>::type, void>::value, void>::type
+      !std::is_same<typename std::remove_cv<T>::type, void>::value, void>::type
   Deallocate(T *Ptr, size_t /*Num*/) {
     Deallocate(static_cast<const void *>(Ptr));
   }





More information about the llvm-commits mailing list