36#ifndef CPP_UTIL_H_INCLUDED
37#define CPP_UTIL_H_INCLUDED
60#define ARRAY_ASSERT(exp)
63template<
typename T,
size_t N>
69 typedef T elem_type_t;
71 static size_t capacity() {
return N; }
73 T& operator[](
size_t index) {
74 ARRAY_ASSERT(index < N);
75 return m_elems[index];
78 const T& operator[](
size_t index)
const {
79 ARRAY_ASSERT(index < N);
80 return m_elems[index];
88inline const T& Min(
const T& a,
const T& b) {
return (a < b) ? a : b; }
91inline const T& Max(
const T& a,
const T& b) {
return (a > b) ? a : b; }
Definition: cpp_util.h:64
Definition: cpp_util.h:45