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 _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost