incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <se...@roguewave.com>
Subject Re: question about aligned_storage
Date Wed, 25 Jun 2008 03:35:12 GMT
Travis Vitek wrote:
>  
> 
> Martin Sebor wrote:
>> While looking at the hoops we jump through to implement aligned_storage
>> I recalled the gcc __attribute__ (aligned (N)). Is there any to use it
>> to simplify the implementation for gcc?
> 
> We already do.

You're a step (or a few) ahead of me, as usual... :)

> Have a look at the definition of the macro
> _RWSTD_TT_ALIGNED_POD().

You mean the one in rw/_gcc-config.h on the 103 character long line?
(You almost got away with it ;-)

> 
> I might be able to eliminate __rw_aligned_storage_impl<> if I wanted to
> do a partial specialization of __rw_aligned_storage<> on the _Align
> non-type template parameter and I could also eliminate
> __rw_default_alignment<>, but that is about as much as I think I could
> reduce it.

I'm probably missing something but is aligned_storage only specified
for alignment of powers of 2? (It looks to me as though those are the
only alignments we support.)

Martin

> 
>> See http://tinyurl.com/5kmvdy for reference.
>>
>> Martin
>>
>>


Mime
View raw message