$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Delfin Rojas (drojas_at_[hidden])
Date: 2006-07-16 18:56:13
> Zhuo Hao wrote:
>
> <snap>
>
> I wonder how it is implemented that we cannot pass zero as a
> pointer to Y in the constructor of shared_ptr.
Consider:
template <class U>
class P
{
public:
template <class V>
P(V * v) : u(v) {}
private:
U *u;
};
Now "P<CMutex> p1(0);" will not compile but "P<CMutex> p1(new CMutex);"
will.
-delfin