[cfe-dev] Template attributes lose their inherited flag on instantiations

Rafael EspĂ­ndola rafael.espindola at gmail.com
Tue Apr 16 08:15:17 PDT 2013

> If it is applied to the class, then it automatically applies to all member
> functions and static fields. This is already implemented, by iterating over
> those members and giving them an inherited import/export attribute.
> But as stated, this breaks for class templates. And the distinction is
> needed because specifying the attributes both on the class and a member is
> forbidden.

Sorry, what is the syntax. I am trying

class __attribute__((dllexport)) foo {

and I get

warning: 'dllexport' attribute only applies to variables and functions

> -Nico


More information about the cfe-dev mailing list