11 #ifndef EIGEN_STDDEQUE_H 12 #define EIGEN_STDDEQUE_H 17 #if defined(__INTEL_COMPILER) || defined(__GNUC__) 18 #define EIGEN_EXPLICIT_STL_DEQUE_INSTANTIATION(...) template class std::deque<__VA_ARGS__, EIGEN_ALIGNED_ALLOCATOR<__VA_ARGS__> >; 20 #define EIGEN_EXPLICIT_STL_DEQUE_INSTANTIATION(...) 28 #define EIGEN_DEFINE_STL_DEQUE_SPECIALIZATION(...) \ 29 EIGEN_EXPLICIT_STL_DEQUE_INSTANTIATION(__VA_ARGS__) \ 32 template<typename _Ay> \ 33 class deque<__VA_ARGS__, _Ay> \ 34 : public deque<__VA_ARGS__, EIGEN_ALIGNED_ALLOCATOR<__VA_ARGS__> > \ 36 typedef deque<__VA_ARGS__, EIGEN_ALIGNED_ALLOCATOR<__VA_ARGS__> > deque_base; \ 38 typedef __VA_ARGS__ value_type; \ 39 typedef typename deque_base::allocator_type allocator_type; \ 40 typedef typename deque_base::size_type size_type; \ 41 typedef typename deque_base::iterator iterator; \ 42 explicit deque(const allocator_type& a = allocator_type()) : deque_base(a) {} \ 43 template<typename InputIterator> \ 44 deque(InputIterator first, InputIterator last, const allocator_type& a = allocator_type()) : deque_base(first, last, a) {} \ 45 deque(const deque& c) : deque_base(c) {} \ 46 explicit deque(size_type num, const value_type& val = value_type()) : deque_base(num, val) {} \ 47 deque(iterator start, iterator end) : deque_base(start, end) {} \ 48 deque& operator=(const deque& x) { \ 49 deque_base::operator=(x); \ 56 #if !(defined(_GLIBCXX_DEQUE) && (!EIGEN_GNUC_AT_LEAST(4,1))) 60 #define EIGEN_STD_DEQUE_SPECIALIZATION_BODY \ 62 typedef T value_type; \ 63 typedef typename deque_base::allocator_type allocator_type; \ 64 typedef typename deque_base::size_type size_type; \ 65 typedef typename deque_base::iterator iterator; \ 66 typedef typename deque_base::const_iterator const_iterator; \ 67 explicit deque(const allocator_type& a = allocator_type()) : deque_base(a) {} \ 68 template<typename InputIterator> \ 69 deque(InputIterator first, InputIterator last, const allocator_type& a = allocator_type()) \ 70 : deque_base(first, last, a) {} \ 71 deque(const deque& c) : deque_base(c) {} \ 72 explicit deque(size_type num, const value_type& val = value_type()) : deque_base(num, val) {} \ 73 deque(iterator start, iterator end) : deque_base(start, end) {} \ 74 deque& operator=(const deque& x) { \ 75 deque_base::operator=(x); \ 81 :
public deque<EIGEN_WORKAROUND_MSVC_STL_SUPPORT(T),
82 Eigen::aligned_allocator_indirection<EIGEN_WORKAROUND_MSVC_STL_SUPPORT(T)> >
89 { resize(new_size,
T()); }
93 void resize(size_type new_size,
const value_type& x)
95 if (deque_base::size() < new_size)
96 deque_base::_Insert_n(deque_base::end(), new_size - deque_base::size(), x);
97 else if (new_size < deque_base::size())
98 deque_base::erase(deque_base::begin() + new_size, deque_base::end());
100 void push_back(
const value_type& x)
101 { deque_base::push_back(x); }
102 void push_front(
const value_type& x)
103 { deque_base::push_front(x); }
105 iterator
insert(const_iterator position,
const value_type& x)
107 void insert(const_iterator position, size_type new_size,
const value_type& x)
109 #elif defined(_GLIBCXX_DEQUE) && EIGEN_GNUC_AT_LEAST(4,2) 111 void resize(size_type new_size,
const value_type& x)
113 if (new_size < deque_base::size())
114 deque_base::_M_erase_at_end(this->_M_impl._M_start + new_size);
121 void resize(size_type new_size,
const value_type& x)
123 if (new_size < deque_base::size())
124 deque_base::erase(deque_base::begin() + new_size, deque_base::end());
125 else if (new_size > deque_base::size())
132 #endif // check whether specialization is actually required 134 #endif // EIGEN_STDDEQUE_H
USING_NAMESPACE_ACADO typedef TaylorVariable< Interval > T
deque< EIGEN_WORKAROUND_MSVC_STL_SUPPORT(T), Eigen::aligned_allocator_indirection< EIGEN_WORKAROUND_MSVC_STL_SUPPORT(T)> > deque_base
void resize(size_type new_size, const value_type &x)
#define EIGEN_STD_DEQUE_SPECIALIZATION_BODY
EIGEN_STD_DEQUE_SPECIALIZATION_BODY void resize(size_type new_size)
#define EIGEN_ALIGNED_ALLOCATOR
#define EIGEN_WORKAROUND_MSVC_STL_SUPPORT(T)
static void insert(double *xd, double *xa, double *u, double *p)