B
Biff
Is there a common way to check for vector indexes being in bounds? My
version of the STL has no such check, even in debug builds. I was
considering deriving a class from Vector with its own operator[], and using
that in my code instead of std::vector. Then I'd use an #ifdef _DEBUG
switch which typedef'ed my vector class name to std::vector if in release or
used the derived class if in debug. Does that sound reasonable? Is there
an easier and more common way?
version of the STL has no such check, even in debug builds. I was
considering deriving a class from Vector with its own operator[], and using
that in my code instead of std::vector. Then I'd use an #ifdef _DEBUG
switch which typedef'ed my vector class name to std::vector if in release or
used the derived class if in debug. Does that sound reasonable? Is there
an easier and more common way?