12 #ifndef ECL_CONTAINERS_ARRAY_NO_MEM_CHECK_HPP_
13 #define ECL_CONTAINERS_ARRAY_NO_MEM_CHECK_HPP_
14 #ifndef ECL_MEM_CHECK_ARRAYS
23 #include "../definitions.hpp"
24 #include "../initialiser.hpp"
25 #include "../stencil.hpp"
43 namespace blueprints {
45 template <
typename Type,
size_t N>
class ArrayFactory;
46 template <
typename Derived>
class ArrayBluePrint;
47 template <
typename Type,
size_t Size>
class ConstantArray;
51 namespace formatters {
53 template <
typename Type,
size_t N>
class ArrayFormatter;
105 template<
typename Type, std::
size_t Size = DynamicStorage>
111 typedef Type value_type;
113 typedef const Type* const_iterator;
115 typedef const Type& const_reference;
188 iterator begin() {
return elements; }
193 const_iterator begin()
const {
return elements; }
198 iterator end() {
return elements+Size; }
203 const_iterator end()
const {
return elements+Size; }
208 reverse_iterator rbegin() {
return reverse_iterator(end()); }
213 const_reverse_iterator rbegin()
const {
return const_reverse_iterator(end()); }
218 reverse_iterator rend() {
return reverse_iterator(begin()); }
223 const_reverse_iterator rend()
const {
return const_reverse_iterator(begin()); }
232 reference front() {
return elements[0]; }
237 const_reference front()
const {
return elements[0]; }
242 reference back() {
return elements[Size-1]; }
247 const_reference back()
const {
return elements[Size-1]; }
278 reference operator[](size_type i) {
293 const_reference operator[](size_type i)
const {
307 reference at(size_type i) {
325 const_reference at(size_type i)
const {
352 template <
typename OutputStream,
typename ElementType,
size_t ArraySize>
356 value_type elements[Size];
363 template <
typename OutputStream,
typename ElementType,
size_t ArraySize>
369 for(
size_t i = 0; i < ArraySize; ++i )
371 ostream << array[i] <<
" ";
384 namespace blueprints {
410 template <
typename Derived>
411 class ArrayBluePrint {
425 template <
typename BaseType>
427 return static_cast<Derived*
>(
this)->instantiate();
442 template <
typename BaseType>
444 static_cast<const Derived*
>(
this)->apply(array);
457 template <
typename Type,
size_t Size>
488 std::fill_n(array.
begin(),Size,
val);
497 std::fill_n(array.begin(),Size,
val);
512 template<
typename Type,
size_t Size>