Re: Template aliases and attributes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 11/29/19 4:44 PM, Alexander Monakov wrote:

> gcc expects the attribute on the type being declared, not the base type,
> so you need to place the attribute on vtype:
> 
> template<typename T, int len>
> using vtype __attribute__ ((vector_size (len*sizeof(T)))) = T;
> 
> This matches how [[attributes]] are meant to be placed in C++11 alias templates.

Oh, I see! Thank you very much for the explanation!

Cheers,
  Martin




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux