111
|
1 /* Test visibility attribute on template member function
|
|
2 instantiations. */
|
|
3
|
|
4 /* { dg-do compile } */
|
|
5 /* { dg-options "-fvisibility=hidden" } */
|
|
6 /* { dg-require-visibility "" } */
|
|
7 /* { dg-final { scan-not-hidden "_ZN7myClassIiE3maxEii" } } */
|
|
8
|
|
9 #define EXPORT __attribute__((visibility("default")))
|
|
10
|
|
11 template <class T>
|
|
12 class EXPORT myClass {
|
|
13 public:
|
|
14 T max (T t1, T t2);
|
|
15 };
|
|
16
|
|
17 template <class T>
|
|
18 T myClass<T>::max (T t1, T t2) {
|
|
19 return (t1 > t2 ? t1 : t2);
|
|
20 }
|
|
21
|
|
22 template class myClass<int>;
|