Boost logo

Boost :

Subject: Re: [boost] Interest in a "Heterogenous Container" system?
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-08-03 11:58:28


Christian Schladetsch wrote:
> On Mon, Aug 3, 2009 at 5:44 AM, Frank Mori Hess <fmhess_at_[hidden]>wrote:
>> On Saturday 01 August 2009, Mathias Gaunard wrote:
>>> I personally never understood why they tied the type into the allocator.
>>> Having just the size and alignment would be so much better.
>> It seems to me any benefits of such a scheme would be non-portable, since
>> the sizes and alignments of two types may be the same with one compiler
>> (setting) and different with others.
> I don't see a problem. As long as the objects are created with correct
> alignment for a given compiler (setting), what that alignment is, is not
> important.

Unfortunately, this requires the ability to find the alignment of
an arbitrary type. boost::alignment_of only guarantees that it
will return a positive multiple of the type's alignment.

In Christ,
Steven Watanabe

Boost list run by bdawes at, gregod at, cpdaniel at, john at