------- Additional Comments From pcarlini at suse dot de  2004-12-27 15:45 
-------
Hi again! Yes, I can confirm that the patch works fine here: regtests ok and
both the above testcase and the below pass with it, which basically amounts
to making possible a decent implementation of tr1::type_traits::aligned_storage
Thanks Giovanni! Please post your complete work ASAP and let's have this fixed
for 4.0 too, if possible!

//////////////////

struct A
{ typedef char type[4] __attribute__((aligned(4))); };

template<unsigned, unsigned>
  struct B;

template<unsigned _Len>
  struct B<_Len, 4>
  { typedef char type[_Len] __attribute__((aligned(4))); };

template<bool> struct StaticAssert;
template<> struct StaticAssert<true> {};

StaticAssert<__alignof__(A::type) == __alignof__(B<4, 4>::type)> a1;
StaticAssert<__alignof__(B<4, 4>::type) == 4> a2;

//////////////////

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19163

Reply via email to