summaryrefslogtreecommitdiff
path: root/src/memory.hh
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2015-06-26 21:32:37 +0100
committerMaxime Coste <frrrwww@gmail.com>2015-06-26 21:32:37 +0100
commit1170277e91490f455d9727fa29c38d60c710151b (patch)
treedf2aa6c61a596427e8b797856db735bc5abd9b6f /src/memory.hh
parent1af82e2e24779e863a41fc7bc68bcf5f0f197e8e (diff)
Always inline Allocator::construct/destroy
Diffstat (limited to 'src/memory.hh')
-rw-r--r--src/memory.hh2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/memory.hh b/src/memory.hh
index a31e83c9..fb36b3e7 100644
--- a/src/memory.hh
+++ b/src/memory.hh
@@ -112,12 +112,14 @@ struct Allocator
}
template<class U, class... Args>
+ [[gnu::always_inline]]
void construct(U* p, Args&&... args)
{
new ((void*)p) U(std::forward<Args>(args)...);
}
template<class U>
+ [[gnu::always_inline]]
void destroy(U* p) { p->~U(); }
};