Bare-metal arrays made safe: a simple protected-pointer template for C++

One of the reasons why C++ is still the professionals’ language is because of its flexibility.  You can use STL collections, and they’ll work as automatically and as safely as anything in Java or C#. Or you can use naked  pointers into unprotected memory, and it will be as fast as old-style C, but just as dangerous.  But, between these two extremes, there’s a need for something as fast and efficient as real memory, but safe – as safe as Pascal.  And that’s a different animal from either.

Continue reading