$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Sebastian Redl (sebastian.redl_at_[hidden])
Date: 2006-04-25 03:40:42
Eoin wrote:
>But I get a boost::bad_weak_ptr error. Now if I use regular pointers
>instead of weak_ptr's I can get stuff working except that when I use
>"bar_(this)" in the initialization list for foo MSVC 7.1 gives me a
>warning, which I don't like. Is there a more appropriate method I should
>be using to accomplish this.
>
>
Just use a regular pointer. As the bar object is a subobject of foo, it
is guaranteed to be destructed first, meaning that the pointer can never
be invalid in the lifetime of bar.
Sebastian Redl