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; }
21 Assert(i >= 0 && i < s);
24 const_reference at(int i) const {
25 Assert(i >= 0 && i < s);
28 reference operator[](int i) { return arr[i]; }
29 const_reference operator[](int i) const { return arr[i]; }
30 void operator=(block const & b) {
31 Assert(b.size() == size());
32 for (size_t i = 0; i < size(); ++i) {
36 bool operator==(block const & b) const {
37 Assert(b.size() == size());
38 for (size_t i = 0; i < size(); ++i) {
39 if (arr[i] != b[i]) return false;
43 iterator begin() { return arr[0]; }
44 iterator end() { return arr[s]; }
45 const_iterator begin() const { return arr[0]; }
46 const_iterator end() const { return arr[s]; }