Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2003-10-05 14:49:50


Robert Ramey <ramey_at_[hidden]> writes:

> Since arrays are of fixed size and always exist

int f()
{
   Foo x[3];
   return x[0].value();
}

The array in the code snippet above does not always exist. It is
created when the function is entered and destroyed when it exits.

Elements can be constructed at will in suitably aligned raw memory,
and an array will be created.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

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