bug #455: add support for c++11 in aligned_allocator

This commit is contained in:
Gael Guennebaud 2012-05-03 11:55:30 +02:00
parent 823c44e4e5
commit ce2e2fe336

View File

@ -720,6 +720,15 @@ public:
::new( p ) T( value );
}
// Support for c++11
#if (__cplusplus >= 201103L)
template<typename... Args>
void construct(pointer p, Args&&... args)
{
::new(p) T(std::forward<Args>(args)...);
}
#endif
void destroy( pointer p )
{
p->~T();