mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-07-10 23:21:47 +08:00
Fix bug #503
C++11 support on simple allocators comes for free. `aligned_allocator` does not need to add any `construct` overloads to work with C++11 compilers. (grafted from a1f056cf2a0318d7a8d4a4bf4c5019c09a8fdbd6 )
This commit is contained in:
parent
8ea9e762d6
commit
d646cc95ad
@ -729,15 +729,6 @@ 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…
x
Reference in New Issue
Block a user