mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-27 07:29:52 +08:00
bug #455: add support for c++11 in aligned_allocator
This commit is contained in:
parent
823c44e4e5
commit
ce2e2fe336
@ -720,6 +720,15 @@ public:
|
|||||||
::new( p ) T( value );
|
::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 )
|
void destroy( pointer p )
|
||||||
{
|
{
|
||||||
p->~T();
|
p->~T();
|
||||||
|
Loading…
Reference in New Issue
Block a user