Array< T, N > Class Template Reference

A template class holding a C - array of constant size. More...

#include "Array.hpp"

+ Inheritance diagram for Array< T, N >:

Public Member Functions

 Array (std::initializer_list< T > init)
 
assignment with type conversion
Arrayoperator= (const Array &)=default
 
template<typename T2 >
Arrayoperator= (const Array< T2, N > &that)
 
template<typename T2 >
Arrayoperator= (const T2(&that)[N])
 
template<typename T2 >
Arrayoperator= (const std::array< T2, N > &that)
 
template<typename T2 >
Arrayoperator= (std::initializer_list< T2 > that)
 

Related Functions

(Note that these are not member functions.)

template<class T , std::size_t N>
bool operator== (const Array< T, N > &l, const Array< T, N > &r)
 
template<class T , std::size_t N>
bool operator< (const Array< T, N > &l, const Array< T, N > &r)
 
template<class T , std::size_t N>
bool operator!= (const Array< T, N > &l, const Array< T, N > &r)
 
template<class T , std::size_t N>
bool operator> (const Array< T, N > &l, const Array< T, N > &r)
 
template<class T , std::size_t N>
bool operator<= (const Array< T, N > &l, const Array< T, N > &r)
 
template<class T , std::size_t N>
bool operator>= (const Array< T, N > &l, const Array< T, N > &r)
 
template<class T , std::size_t N>
void swap (Array< T, N > &l, Array< T, N > &r)
 

Detailed Description

template<class T, std::size_t N>
class opals::Array< T, N >

A template class holding a C - array of constant size.

Template Parameters
Tthe element type
Nthe constant size, must be >= 1
Author
wk
Date
03.02.2011

Array may be initialized with a static initializer list: opals::Array<double,3> arr = { 1., 2., 3. }; Array fulfills almost all the requirements of an STL reversible container. The complete implementation is exposed and hence, opals users may instantiate Array<T,N> with arbitrary template arguments. The class inherits most of its functionality from std::array.