mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-09-15 02:43:14 +08:00
Merged in martinhofernandes/eigen (pull request PR-40)
Better fix for bug #503
This commit is contained in:
commit
0508af4287
@ -761,11 +761,27 @@ public:
|
|||||||
::new( p ) T( value );
|
::new( p ) T( value );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if (__cplusplus >= 201103L)
|
||||||
|
template <typename U, typename... Args>
|
||||||
|
void construct( U* u, Args&&... args)
|
||||||
|
{
|
||||||
|
::new( static_cast<void*>(u) ) U( std::forward<Args>( args )... );
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void destroy( pointer p )
|
void destroy( pointer p )
|
||||||
{
|
{
|
||||||
p->~T();
|
p->~T();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if (__cplusplus >= 201103L)
|
||||||
|
template <typename U>
|
||||||
|
void destroy( U* u )
|
||||||
|
{
|
||||||
|
u->~U();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void deallocate( pointer p, size_type /*num*/ )
|
void deallocate( pointer p, size_type /*num*/ )
|
||||||
{
|
{
|
||||||
internal::aligned_free( p );
|
internal::aligned_free( p );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user