39 template<
class T,
size_t N>
124 T a[(N > 0) ? N : 1];
132 template<
class T,
size_t N >
133 inline bool operator< (
const array< T, N > &a,
const array< T, N > &b )
135 return std::lexicographical_compare( a.begin(), a.end(), b.begin(), b.end() );
138 template<
class T,
size_t N >
139 inline bool operator> (
const array< T, N > &a,
const array< T, N > &b )
144 template<
class T,
size_t N >
145 inline bool operator<= (
const array< T, N > &a,
const array< T, N > &b )
150 template<
class T,
size_t N >
151 inline bool operator>= (
const array< T, N > &a,
const array< T, N > &b )
158 template <
class T,
size_t N >
168 for (
size_t i=0; i<N-1; i++) s << e[i] <<
",";
176 array<T, 1> result = { {t0} };
181 array<T, 2>
make_array(
const T &t0,
const T &t1) {
182 array<T, 2> result = { {t0, t1} };
187 array<T, 3>
make_array(
const T &t0,
const T &t1,
const T &t2) {
188 array<T, 3> result = { {t0, t1, t2} };
193 array<T, 4>
make_array(
const T &t0,
const T &t1,
const T &t2,
const T &t3) {
194 array<T, 4> result = { {t0, t1, t2, t3} };
199 array<T, 5>
make_array(
const T &t0,
const T &t1,
const T &t2,
const T &t3,
202 array<T, 5> result = { {t0, t1, t2, t3, t4} };
207 array<T, 6>
make_array(
const T &t0,
const T &t1,
const T &t2,
const T &t3,
208 const T &t4,
const T &t5)
210 array<T, 6> result = { {t0, t1, t2, t3, t4, t5} };
215 array<T, 7>
make_array(
const T &t0,
const T &t1,
const T &t2,
const T &t3,
216 const T &t4,
const T &t5,
const T &t6)
218 array<T, 7> result = { {t0, t1, t2, t3, t4, t5, t6} };
223 array<T, 8>
make_array(
const T &t0,
const T &t1,
const T &t2,
const T &t3,
224 const T &t4,
const T &t5,
const T &t6,
const T &t7)
226 array<T, 8> result = { {t0, t1, t2, t3, t4, t5, t6, t7} };
231 array<T, 9>
make_array(
const T &t0,
const T &t1,
const T &t2,
const T &t3,
232 const T &t4,
const T &t5,
const T &t6,
const T &t7,
235 array<T, 9> result = { {t0, t1, t2, t3, t4, t5, t6, t7, t8} };
249 const T &t4,
const T &t5,
const T &t6,
const T &t7,
250 const T &t8,
const T &t9)
252 array<T, 10> result = { t0, t1, t2, t3, t4, t5, t6, t7, t8, t9 };
260 template<
typename T, std::
size_t n>
265#if HAVE_RVALUE_REFERENCES
Simple fixed size array class. This replaces std::array, if that is not available.
Definition: array.hh:40
value_type & reference
Reference to an object.
Definition: array.hh:47
void assign(const T &t) DUNE_DEPRECATED
Assign value to all entries (according to C++0x the fill method is to be prefered)
Definition: array.hh:81
std::ptrdiff_t difference_type
Difference type.
Definition: array.hh:62
std::size_t size_type
Type used for array indices.
Definition: array.hh:59
const value_type & const_reference
Const reference to an object.
Definition: array.hh:50
std::reverse_iterator< iterator > reverse_iterator
Reverse iterator type.
Definition: array.hh:65
reference operator[](size_type i)
Component access.
Definition: array.hh:93
std::reverse_iterator< const_iterator > const_reverse_iterator
Const reverse iterator type.
Definition: array.hh:68
value_type * iterator
Iterator type.
Definition: array.hh:53
size_type size() const
Return array size.
Definition: array.hh:71
const value_type * const_iterator
Const iterator type.
Definition: array.hh:56
array< T, N > & operator=(const T &t)
Assign value to all entries.
Definition: array.hh:74
void fill(const T &t)
Assign value to all entries (according to C++0x the fill method is to be prefered)
Definition: array.hh:87
T value_type
Remember the storage type.
Definition: array.hh:44
Definition of the DUNE_DEPRECATED macro for the case that config.h is not available.
array< T, 10 > make_array(const T &t0, const T &t1, const T &t2, const T &t3, const T &t4, const T &t5, const T &t6, const T &t7, const T &t8, const T &t9)
create an initialize an array
Definition: array.hh:248
array< T, n > fill_array(const T &t)
Create an array and fill it with copies of the provided value.
Definition: array.hh:261
std::ostream & operator<<(std::ostream &s, const array< T, N > &e)
Output operator for array.
Definition: array.hh:159
#define DUNE_DEPRECATED
Mark some entity as deprecated.
Definition: deprecated.hh:84
Dune namespace.
Definition: alignment.hh:14