The range checking wrapper for fixed length C++ arrays

C++ arrays do not provide range checking so Symbian platform offers a thin wrapper to add this functionality to arrays.

The C++ language provides fixed length arrays.

It is often convenient to use these arrays in applications whenever the number of elements is fixed and known at compile time.

The main disadvantage of using C++ arrays is that there is no automatic checking of index value. This means that it is possible to write over data that lies beyond the end of the allocated array size, and to read invalid data from beyond the end of the array.

The templated class TFixedArray<class T,TInt S> , is a thin wrapper for C++ arrays. The major benefits of using this class over a basic C++ array are the provision of range-checked indexing and support for object deletion. There is no runtime penalty for using this class if debug-only range-checking is used.

The class can be embedded as a data member of CBase -derived objects. The class can also be used on the program stack.