Besides Boost, where can I get a single-file smart pointer implementation for C++? -
I want to start using Smart Pointers in my code but I really do not want to use Boost as it is too big is.
Can anyone recommend a file smart pointer implementation?
Thanks, Boda Sido Unfortunately, Smart Pointers are not quite simple, so implementation can be quite complex. If you are using G ++, you can get things like Shared IPTR without using Boost:
#include & lt; Memory & gt; using namespace std; Int main () {shared_ptr & lt; Int & gt; P (new int); }
but you have to compile with the -std = c ++ 0x
flag.
Comments
Post a Comment