Did anyone give these smart pointers (auto_any, scoped_any, shared_any) a test drive?
I'm investigating smart pointers w开发者_StackOverflowith "shared" functionality for Windows CE and Mobile, where the VS 2008 tr1 std::shared_ptr
cannot be used (due to linkage to a v.9 dll not present on CE, obviously, if I understand it correctly).
There's a semi-old MSDN Magazine article with sources from a Microsoftie (Eric Niebler): Achieve More Reliable Resource Management with Our Custom C++ Classes.
The reasoning, design and implementation of his shared_any
looks solid, but I'm wondering if anyone ever actually tested the lot on any platform (not necessarily WinCe/WM)?
You might want to use boost::shared_ptr. As I understand it, the Boost.SmartPointer library is a header-only library, and so you can just copy over the headers you need from Boost to get everything working.
精彩评论