Boost logo

Boost :

From: Gabriel Dos Reis (gdr_at_[hidden])
Date: 2002-12-08 12:15:39


"Eric Woodruff" <Eric.Woodruff_at_[hidden]> writes:

[...]

| Here's a question: Since h.storage is _meant_ to be accessed by those that
| do not know the type of the object inside, shouldn't it have been designed

I'm afraid the above is not an accurate description of the purpose of
holder<T>.

One primary purpose is to allow static or automatic *storage*
allocation for a T, suitably aligned.

| as a void* in the first place? This has two benefits (and I've recently had
| the epiphany of why void* is ok):

Because that won't permit static or automatic storage allocation for a T.

-- Gaby


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