mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-08 18:31:23 +00:00
[Allocator] MSVC apparantly has broken SFINAE context handling of
'sizeof(T)' for T == void and produces a hard error. I cannot fathom why this is OK. Oh well. switch to an explicit test for being the (potentially qualified) void type, which is the only specific case I was worried about. Hopefully this survives the libstdc++ build bots which have limited type traits implementations... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206256 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d63390cba1
commit
2c9a974b2b
@ -98,13 +98,16 @@ public:
|
||||
|
||||
/// \brief Deallocate space for one object without destroying it.
|
||||
template <typename T>
|
||||
typename std::enable_if<sizeof(T) != 0, void>::type Deallocate(T *Ptr) {
|
||||
typename std::enable_if<
|
||||
std::is_same<typename std::remove_cv<T>::type, void>::value, void>::type
|
||||
Deallocate(T *Ptr) {
|
||||
Deallocate(static_cast<const void *>(Ptr));
|
||||
}
|
||||
|
||||
/// \brief Allocate space for an array of objects without constructing them.
|
||||
template <typename T>
|
||||
typename std::enable_if<sizeof(T) != 0, void>::type
|
||||
typename std::enable_if<
|
||||
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));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user