33 #ifndef DART_COMMON_DETAIL_ALIGNEDALLOCATOR_HPP_
34 #define DART_COMMON_DETAIL_ALIGNEDALLOCATOR_HPP_
38 #include "dart/config.hpp"
43 #if EIGEN_VERSION_AT_LEAST(3, 2, 1) && EIGEN_VERSION_AT_MOST(3, 2, 8)
52 class aligned_allocator_cpp11 :
public std::allocator<T>
55 typedef std::size_t size_type;
56 typedef std::ptrdiff_t difference_type;
58 typedef const T* const_pointer;
60 typedef const T& const_reference;
66 typedef aligned_allocator_cpp11<U> other;
69 aligned_allocator_cpp11() :
std::allocator<T>()
73 aligned_allocator_cpp11(
const aligned_allocator_cpp11& other)
74 :
std::allocator<T>(other)
79 aligned_allocator_cpp11(
const aligned_allocator_cpp11<U>& other)
80 :
std::allocator<T>(other)
84 ~aligned_allocator_cpp11()
88 pointer allocate(size_type num,
const void* = 0)
90 Eigen::internal::check_size_for_overflow<T>(num);
91 return static_cast<pointer
>(
92 Eigen::internal::aligned_malloc(num *
sizeof(T)));
95 void deallocate(pointer p, size_type )
97 Eigen::internal::aligned_free(p);
Definition: BulletCollisionDetector.cpp:65
Definition: SharedLibraryManager.hpp:46