1
0
mirror of https://github.com/OlafvdSpek/ctemplate.git synced 2025-09-28 19:05:49 +08:00

Merge pull request #143 from poelmanc/patch-1

C++20 / gcc10 fix: remove hint, removed typedef
This commit is contained in:
Olaf van der Spek 2020-05-12 07:56:27 +02:00 committed by GitHub
commit 1c397b63e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -93,8 +93,7 @@ template <class T, class C> class ArenaAllocator {
ArenaAllocator(C* arena) : arena_(arena) { } // NOLINT ArenaAllocator(C* arena) : arena_(arena) { } // NOLINT
~ArenaAllocator() { } ~ArenaAllocator() { }
pointer allocate(size_type n, pointer allocate(size_type n) {
std::allocator<void>::const_pointer /*hint*/ = 0) {
assert(arena_ && "No arena to allocate from!"); assert(arena_ && "No arena to allocate from!");
return reinterpret_cast<T*>(arena_->AllocAligned(n * sizeof(T), return reinterpret_cast<T*>(arena_->AllocAligned(n * sizeof(T),
kAlignment)); kAlignment));