mirror of
https://gitee.com/zyjblog/oatpp.git
synced 2024-12-22 22:16:37 +08:00
Ubuntu build fix
This commit is contained in:
parent
0a88c55f19
commit
bd026edef0
@ -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...);
|
||||
}
|
||||
|
||||
}}}
|
||||
|
@ -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...); \
|
||||
} \
|
||||
\
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user