10 #ifndef EIGEN_STDLIST_H    11 #define EIGEN_STDLIST_H    20 #define EIGEN_DEFINE_STL_LIST_SPECIALIZATION(...) \    24   class list<__VA_ARGS__, std::allocator<__VA_ARGS__> >           \    25     : public list<__VA_ARGS__, EIGEN_ALIGNED_ALLOCATOR<__VA_ARGS__> > \    27     typedef list<__VA_ARGS__, EIGEN_ALIGNED_ALLOCATOR<__VA_ARGS__> > list_base; \    29     typedef __VA_ARGS__ value_type; \    30     typedef list_base::allocator_type allocator_type; \    31     typedef list_base::size_type size_type;  \    32     typedef list_base::iterator iterator;  \    33     explicit list(const allocator_type& a = allocator_type()) : list_base(a) {}  \    34     template<typename InputIterator> \    35     list(InputIterator first, InputIterator last, const allocator_type& a = allocator_type()) : list_base(first, last, a) {} \    36     list(const list& c) : list_base(c) {}  \    37     explicit list(size_type num, const value_type& val = value_type()) : list_base(num, val) {} \    38     list(iterator start, iterator end) : list_base(start, end) {}  \    39     list& operator=(const list& x) {  \    40       list_base::operator=(x);  \    47 #if !EIGEN_HAS_CXX11_CONTAINERS && !(defined(_GLIBCXX_LIST) && (!EIGEN_GNUC_AT_LEAST(4,1)))     52 #define EIGEN_STD_LIST_SPECIALIZATION_BODY \    54     typedef T value_type; \    55     typedef typename list_base::allocator_type allocator_type; \    56     typedef typename list_base::size_type size_type;  \    57     typedef typename list_base::iterator iterator;  \    58     typedef typename list_base::const_iterator const_iterator;  \    59     explicit list(const allocator_type& a = allocator_type()) : list_base(a) {}  \    60     template<typename InputIterator> \    61     list(InputIterator first, InputIterator last, const allocator_type& a = allocator_type()) \    62     : list_base(first, last, a) {} \    63     list(const list& c) : list_base(c) {}  \    64     explicit list(size_type num, const value_type& val = value_type()) : list_base(num, val) {} \    65     list(iterator start, iterator end) : list_base(start, end) {}  \    66     list& operator=(const list& x) {  \    67     list_base::operator=(x);  \    73     : 
public list<EIGEN_WORKAROUND_MSVC_STL_SUPPORT(T),
    74                   Eigen::aligned_allocator_indirection<EIGEN_WORKAROUND_MSVC_STL_SUPPORT(T)> >
    81     { resize(new_size, T()); }
    83     void resize(size_type new_size, 
const value_type& x)
    85       if (list_base::size() < new_size)
    86         list_base::insert(list_base::end(), new_size - list_base::size(), x);
    88         while (new_size < list_base::size()) list_base::pop_back();
    93     void push_back(
const value_type& x)
    94     { list_base::push_back(x); } 
    95     using list_base::insert;  
    96     iterator insert(const_iterator position, 
const value_type& x)
    97     { 
return list_base::insert(position,x); }
    98     void insert(const_iterator position, size_type new_size, 
const value_type& x)
    99     { list_base::insert(position, new_size, x); }
   104 #endif // check whether specialization is actually required   106 #endif // EIGEN_STDLIST_H 
void resize(size_type new_size, const value_type &x)
list< EIGEN_WORKAROUND_MSVC_STL_SUPPORT(T), Eigen::aligned_allocator_indirection< EIGEN_WORKAROUND_MSVC_STL_SUPPORT(T)> > list_base
#define EIGEN_ALIGNED_ALLOCATOR
#define EIGEN_WORKAROUND_MSVC_STL_SUPPORT(T)
EIGEN_STD_LIST_SPECIALIZATION_BODY void resize(size_type new_size)
#define EIGEN_STD_LIST_SPECIALIZATION_BODY