Looking at the TR1, it seems that shared_ptr and weak_ptr are
destined to be added to the <memory> include file. Currently, if you
have tr1 support for gcc, you need to include <tr1/boost_shared_ptr>.
My guess is that this path is specific to gcc. Should it be the case
that we add the definitions for vcl_shared_ptr (and vcl_weak_ptr) to
<vcl_memory.h> or should there be a new file like <vcl_shared_ptr.h>?
Also, I'm assuming I need to create some sort of CMake compiler test
to see if shared_ptr exists on the system. I'm not sure where to
begin with this. I figured I would model this after
VCL_USE_NATIVE_STL, but I can't even find where that CMake variable is
defined. Can anyone point me in the right direction?
On Fri, Mar 7, 2008 at 6:09 PM, Amitha Perera
> Matt Leotta wrote:
> > We are still sticking to the vcl_
> > prefix correct? So these would be vcl_shared_ptr and vcl_weak_ptr?
> I think they should be. Technically, they'd be in the std::tr1
> namespace, but vcl should gloss over that.
> My thought is that, in the vcl way, if std::tr1::shared_ptr exists[*],
> then vcl_shared_ptr should be a #define to that. Otherwise, it'll fall
> back to a boost-based implementation.
> I'd be willing to help.
> [*] It does exist on many compilers. For example, g++ 4.1.3 has it.
> (And it happens to be a boost based implementation.)