From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Hoe-Phuan Ng
Sent: Saturday, July 23, 2011 7:56 PM
To: boost-users@lists.boost.org
Subject: [Boost-users] Pointer "boundary checker" class or tools?

I a new to C++.  Have not use it yet.
For a long time I was wondering if there is a way to automatically check if  pointer
has creep out of its "known area of access" in memory.
Obviously such tool to check pointer would be really slow or too slow
for release codes since we want to check pointer location at each pointer access, read or write. 
Hi,
 
I would discourage anybody to C++ from using plain arrays if there is not a really good reason to do so. The stl provides std::vector for dynamic arrays which has a checked access method. Additionally, implementations may provide additional checks in debug code, e.g. Visual C++ provides checked iterators and other stuff. For fixed-sized arrays, std::array mimics the std::vector interface.
 
Best regards,
  Jens