diff --git a/include/llvm/Support/Allocator.h b/include/llvm/Support/Allocator.h index d96c8f254cc..034661f4bcd 100644 --- a/include/llvm/Support/Allocator.h +++ b/include/llvm/Support/Allocator.h @@ -98,13 +98,16 @@ public: /// \brief Deallocate space for one object without destroying it. template - typename std::enable_if::type Deallocate(T *Ptr) { + typename std::enable_if< + std::is_same::type, void>::value, void>::type + Deallocate(T *Ptr) { Deallocate(static_cast(Ptr)); } /// \brief Allocate space for an array of objects without constructing them. template - typename std::enable_if::type + typename std::enable_if< + std::is_same::type, void>::value, void>::type Deallocate(T *Ptr, size_t /*Num*/) { Deallocate(static_cast(Ptr)); }