summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/explicit7.C
blob: 7424677181a787e2a8e62fdc59e6a62e793b4f20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// PR c++/22263
// { dg-do link }

template <class T> struct S { T foo (); T bar (); };
template <class T> T S<T>::foo () { return bar (); }
template struct S<int>;
template <class T> T S<T>::bar () { return T (); }

#if !__GXX_WEAK__
template int S<int>::bar ();
#endif

int main () { return S<int>().foo (); }