mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 19:52:54 +01:00
[Allocator] Hack around the fact that GCC can't compile the
static_assert added in r206225. I'm looking into a proper fix, but wanted the bots back. llvm-svn: 206226
This commit is contained in:
parent
e2b7c08bf9
commit
e214e6ab62
@ -50,12 +50,14 @@ public:
|
||||
/// \brief Allocate \a Size bytes of \a Alignment aligned memory. This method
|
||||
/// must be implemented by \c DerivedT.
|
||||
void *Allocate(size_t Size, size_t Alignment) {
|
||||
#ifdef __clang__
|
||||
static_assert(static_cast<void *(AllocatorBase::*)(size_t, size_t)>(
|
||||
&AllocatorBase::Allocate) !=
|
||||
static_cast<void *(DerivedT::*)(size_t, size_t)>(
|
||||
&DerivedT::Allocate),
|
||||
"Class derives from AllocatorBase without implementing the "
|
||||
"core Allocate(size_t, size_t) overload!");
|
||||
#endif
|
||||
return static_cast<DerivedT *>(this)->Allocate(Size, Alignment);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user