9 template <class T, size_t s>
15 typedef size_t size_type;
19 typedef T const * const_pointer;
21 typedef T & reference;
23 typedef T const & const_reference;
27 typedef T const * const_iterator;
29 size_type size() const { return s; }
32 Assert(i >= 0 && i < s);
36 const_reference at(int i) const {
37 Assert(i >= 0 && i < s);
41 reference operator[](int i) { return arr[i]; }
43 const_reference operator[](int i) const { return arr[i]; }
45 void operator=(block const & b) {
46 Assert(b.size() == size());
47 for (size_t i = 0; i < size(); ++i) {
52 bool operator==(block const & b) const {
53 Assert(b.size() == size());
54 for (size_t i = 0; i < size(); ++i) {
55 if (arr[i] != b[i]) return false;
60 iterator begin() { return arr[0]; }
62 iterator end() { return arr[s]; }
64 const_iterator begin() const { return arr[0]; }
66 const_iterator end() const { return arr[s]; }