Template aliases and attributes

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

 



Hi,

g++ is unhappy about the statement:

template<typename T, int len> using vtype = T __attribute__
((vector_size (len*sizeof(T))));

and reports:

vectest.cc:1:91: warning: ignoring attributes applied to dependent type
‘T’ without an associated declaration [-Wattributes]
    1 |  using vtype = T __attribute__ ((vector_size (len*sizeof(T))));
      |                                                              ^

clang++ on the other hand seems to be OK with this.

Is there some subtlety I'm missing?
If so, is there analternative way to express what I have in mind?

Thanks in advance,
  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