
20 Feb
2010
20 Feb
'10
4:35 a.m.
Hi,
Lately I find myself using boost::array intesively, specially in
small demo programs. Sometimes, when "manually" accessing the elements
I type a index out of range. The library can detect these errors once
the program is running but I found this a waste, also I was surprised
not to see this kind of static check not implemented in the library.
So I wanted to see if I could enforce range checking at compile time,
and I come out with this solution.
namespace boost{ //sorry about the namespace name
template