Boost logo

Boost :

From: Shankar Sai (sai.shankar_at_[hidden])
Date: 2001-04-03 03:46:49


|> -----Original Message-----
|> From: Beman Dawes [mailto:bdawes_at_[hidden]]
|> Sent: Tuesday, April 03, 2001 4:29 AM
|> To: boost_at_[hidden]
|> Subject: Re: [boost] Re: scoped_ptr: trivial dtor?
|>
|>
|> At 10:25 AM 3/29/2001, Vladimir Prus wrote:
|>

|> >As I have stated in previous post, with sizeof(T):
|> >
|> > ~scoped_ptr() {
|> > sizeof(T);
|> > delete p;
|> > }

Why cant we have in the scoped_ptr class declaration:

private:
enum { val = sizeof(T) };

and avoid the need for it everywhere? Or am i missing
something?

Rgds
Sai


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk