Topic: aligned_types feedback (was 2007-03-pre-Oxford mailing, lwg issues


Author: cppljevans@suddenlink.net (Larry Evans)
Date: Fri, 30 Mar 2007 06:23:32 GMT
Raw View
On 03/23/2007 11:38 PM, Larry Evans wrote:
[snip]
> templates.  The code and report are at:
>
>   http://boost-consulting.com/vault
>
> in subdirectory/file:
>
>   variadic_templates/mpl-vt.zip
>
> The actual report is in:
>
>   mpl-vt.zip(c++committee/VariadicTemplateExperiences.txt)
>
> One part of that report mentions an offsets template for
> calculating offsets of elements in a "flat" tuple implementation.
> Does anyone have some idea how this could be done portably?

At the same location, there's aligned_types.zip.  It contains
aligned_types.hpp and a test driver.  The aligned_types
template is similar to aligned_union except it has
another parameter to indicate whether the supplied
types are meant for a union or a struct or a packed
struct.  There's a union and packed implementation
and I was hoping someone would provide feedback on
their correctness.  Also, I was hoping someone could
use what's there to implement the remaining aligned_types,
i.e. the one for "unpacked" struct.

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]