summaryrefslogtreecommitdiff
path: root/src/tests/constsptr2.cpp (follow)
AgeCommit message (Collapse)Author
2007-04-10David had it half right...to make it work like something that's actually a constMike Buland
pointer he's right, the pointer needs to be rebindable, but for a: const int *p; p can be changed, but not what p points to. I've added the rest of the operators in sptr that should accomplish this, and a test that actually tests the correctness of SPtr used this way against a normal pointer, both tests check out 100%, hopefully this dosen't break anything, but if it should act like a pointer, this is how to do it. (I totally forgot that const pointers were rebindable).