Oh, actually, not really. boost::shared_array does not track the size. It would be much better to modify it to do that than to try and come up with something from scratch, off the top of your head.

But what is spelltwister really looking for, anyway?