From: Joel de Guzman (djowel_at_[hidden])
Date: 2003-04-21 07:37:24
Fernando Cacciola wrote:
> padding 100%, but which will be quite easy to use is this:
> template<class T, class tag_t>
> struct aligned_storage
> void const* address() const ;
> void* address();
> // If tag_t fits in the padding, it is allocated there,
> // else it is allocated separately (but in here)
> tag_t const& tag() const ;
> tag_t& tag();
Funny, that was my first prototype :o)...
Yes, that's very good, if it's possible to implement....
I was concerned about, emmm..., alignment issues.
I reckon tag_t type should be enforced to be an integral
of some size.
-- Joel de Guzman joel at boost-consulting.com http://www.boost-consulting.com http://spirit.sf.net
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk