Boost logo

Boost :

From: Gary Powell (Gary.Powell_at_[hidden])
Date: 2001-01-09 11:41:00


IMO, the following is easier to teach.

> int main()
> {
> auto_ptr<X> apx(new X);
>
   auto_ptr<X[]> apxa( new X[] );
> }
>
The rule being, if you want a scoped "new" use auto_ptr.

I also like Howard use of the compile time asserts to make sure that it
isn't misused.

  -Gary-

gary.powell_at_[hidden]


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