|
Boost : |
From: Gabriel Dos Reis (gdr_at_[hidden])
Date: 2002-12-04 15:41:16
"David B. Held" <dheld_at_[hidden]> writes:
| "Gabriel Dos Reis" <gdr_at_[hidden]> wrote in message
| news:m38yz5pp08.fsf_at_uniton.integrable-solutions.net...
| > [...]
| > What do mean exactly by a "valid Foo*"?
|
| Hmm...I think 5.2.10/7 is more relevant. I guess it depends on what
| "unspecified" means. I assumed that it meant that you have a Foo*,
| but it might not point to an actual Foo.
OK, now, let's recall the original construct
template <class T>
struct holder
{
union {
aligned_POD<T>::type aligner;
char storage[sizeof(T)];
};
};
the Standard makes no guarantee that you do the conversion
char* -> void* -> T*
on &h.storage[0] and have a usuable T*.
-- Gaby
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk