[cfe-commits] Small visibility fix

Douglas Gregor dgregor at apple.com
Tue Jul 31 10:41:12 PDT 2012


LGTM, thanks!

On Jul 28, 2012, at 5:53 AM, Rafael EspĂ­ndola <rafael.espindola at gmail.com> wrote:

> The attached patch fixes the visibility for
> 
> template<int i>
> class __attribute__((visibility("hidden"))) a {};
> template<int i>
> class __attribute__((visibility("default"))) b {};
> template<template<int> class x, template<int> class y>
> void test() {}
> void use() {
>  test<a, b>();
>  test<b, a>();
> }
> 
> Note that gcc produces a default symbol for these, but it also
> produces a visible symbol for
> 
> namespace {
>  template<int i>
>  class  a {};
>  template<int i>
>  class  b {};
> }
> template<template<int> class x, template<int> class y>
> void test() {}
> void use() {
>  test<a, b>();
>  test<b, a>();
> }
> 
> so it looks like they just ignore template parameters.
> 
> Cheers,
> Rafael
> <t.patch>





More information about the cfe-commits mailing list