Always inline Allocator::construct/destroy

This commit is contained in:
Maxime Coste 2015-06-26 21:32:37 +01:00
parent 1af82e2e24
commit 1170277e91

View File

@ -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(); }
};