Ubuntu build fix

This commit is contained in:
lganzzzo 2018-03-13 23:56:43 +02:00
parent 0a88c55f19
commit bd026edef0
2 changed files with 5 additions and 4 deletions

View File

@ -157,8 +157,9 @@ inline bool operator != (const SharedObjectAllocator<T>& a, const SharedObjectAl
template<typename T, typename ... Args>
static std::shared_ptr<T> allocateSharedWithExtras(AllocationExtras& extras, Args... args){
SharedObjectAllocator<T> allocator(extras);
return std::shared_ptr<T>::allocate_shared(allocator, args...);
typedef SharedObjectAllocator<T> _Allocator;
_Allocator allocator(extras);
return std::allocate_shared<T, _Allocator>(allocator, args...);
}
}}}

View File

@ -49,7 +49,7 @@ public: \
\
template<typename ... Args> \
static std::shared_ptr<TYPE> allocateShared(Args... args){ \
return std::shared_ptr<TYPE>::allocate_shared(getAllocator(), args...); \
return std::allocate_shared<TYPE, Allocator>(getAllocator(), args...); \
} \
\
};
@ -74,7 +74,7 @@ public: \
\
template<typename ... Args> \
static std::shared_ptr<TYPE> allocateShared(Args... args){ \
return std::shared_ptr<TYPE>::allocate_shared(getAllocator(), args...); \
return std::allocate_shared<TYPE, Allocator>(getAllocator(), args...); \
} \
\
};