
20 Aug
2004
20 Aug
'04
12:12 p.m.
Date: Thu, 19 Aug 2004 21:09:07 -0400 From: "Joe Gottman" <jgottman@carolina.rr.com> Subject: [boost] shared_ptr feature request: void_pointer_cast
I know this isn't the best time to request a new feature, but I just had an idea for an extremely useful new function for shared_ptr. It is common to use a shared_ptr<void> in places where a void * would otherwise be used. While a void * can point to anything, there is no safe way to determine at run-time what type it originally pointed to. Casting it to the wrong type can result in undefined behavior.
How is this idea any different that just using boost::shared_ptr<boost::any> ? Jeff