8 template <class T, size_t s>
12 typedef size_t size_type;
14 typedef T const * const_pointer;
15 typedef T & reference;
16 typedef T const & const_reference;
18 typedef T const * const_iterator;
19 size_type size() const { return s; }
20 #warning I disabled this to be able to compile... (JMarc)
21 // I think that, sor the same reason that string->char* is not
22 // automatic, we should have a c_array() method to do that. However,
23 // Lars, it is your choice...
24 // operator T* () { return arr; }
26 Assert(i >= 0 && i < s);
29 const_reference at(int i) const {
30 Assert(i >= 0 && i < s);
33 reference operator[](int i) { return arr[i]; }
34 const_reference operator[](int i) const { return arr[i]; }
35 void operator=(block const & b) {
36 Assert(b.size() == size());
37 for (size_t i = 0; i < size(); ++i) {
41 bool operator==(block const & b) const {
42 Assert(b.size() == size());
43 for (size_t i = 0; i < size(); ++i) {
44 if (arr[i] != b[i]) return false;
48 iterator begin() { return arr[0]; }
49 iterator end() { return arr[s]; }
50 const_iterator begin() const { return arr[0]; }
51 const_iterator end() const { return arr[s]; }