forked from OSchip/llvm-project
[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. llvm-svn: 206259
This commit is contained in:
parent
c359ad00a6
commit
553283e57d
|
@ -99,7 +99,7 @@ public:
|
||||||
/// \brief Deallocate space for one object without destroying it.
|
/// \brief Deallocate space for one object without destroying it.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
typename std::enable_if<
|
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(T *Ptr) {
|
||||||
Deallocate(static_cast<const void *>(Ptr));
|
Deallocate(static_cast<const void *>(Ptr));
|
||||||
}
|
}
|
||||||
|
@ -107,7 +107,7 @@ public:
|
||||||
/// \brief Allocate space for an array of objects without constructing them.
|
/// \brief Allocate space for an array of objects without constructing them.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
typename std::enable_if<
|
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(T *Ptr, size_t /*Num*/) {
|
||||||
Deallocate(static_cast<const void *>(Ptr));
|
Deallocate(static_cast<const void *>(Ptr));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue