Debian Codegraph @

gcc/testsuite/g++.dg/template/dr1391-3.C

raw
1 // DR 1391
2
3 template <class T> struct Z {
4 typedef typename T::x xx;
5 };
6 template <class T> typename Z<T>::xx f(void *, T);
7 template <class T> void f(int, T);
8 struct A {} a;
9 int main() {
10 f(1, a); // If the implementation rules out the first overload
11 // because of the invalid conversion from int to void*,
12 // the error instantiating Z<A> will be avoided
13 }