33#ifndef DART_COMMON_DETAIL_ALIGNEDALLOCATOR_HPP_
34#define DART_COMMON_DETAIL_ALIGNEDALLOCATOR_HPP_
40#include "dart/config.hpp"
45#if EIGEN_VERSION_AT_LEAST(3, 2, 1) && EIGEN_VERSION_AT_MOST(3, 2, 8)
54class aligned_allocator_cpp11 :
public std::allocator<T>
57 typedef std::size_t size_type;
58 typedef std::ptrdiff_t difference_type;
60 typedef const T* const_pointer;
62 typedef const T& const_reference;
68 typedef aligned_allocator_cpp11<U> other;
71 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() {}
86 pointer allocate(size_type num,
const void* = 0)
88 Eigen::internal::check_size_for_overflow<T>(num);
89 return static_cast<pointer
>(
90 Eigen::internal::aligned_malloc(num *
sizeof(T)));
93 void deallocate(pointer p, size_type )
95 Eigen::internal::aligned_free(p);
Definition BulletCollisionDetector.cpp:60
Definition SharedLibraryManager.hpp:46