https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61718
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- > default <nothing> hidden Simple since YYY is hidden (by the paragma), XXX<YYY*> has to be also hidden because there is no way to export the class XXX<YYY*> since it depends on the visibility of YYY. If you think it should have been visible, then you will can get an One definition rule violation if another shared library has a class named YYY.