C++ buffer class similar but not identical to array and vector.