Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/template/ttp25.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
// { dg-do compile } template<typename T, template<T> class C> void f1(T, C<5>); // { dg-message "note" } template<typename T, template<T> class C> void f2(C<5>, T); template<typename T, template<T> class C> void f3(C<5>, T); // { dg-message "note" } template<typename T> struct metafun { typedef T type; }; template<> struct metafun<short> { typedef int type; }; template<typename T, template<typename metafun<T>::type> class C> void f4(T, C<5>); // { dg-message "note" } template<int N> struct X {}; void g() { f1(5l, X<5>()); // { dg-error "no matching" } // { dg-message "(candidate|inconsistent with)" "candidate note" { target *-*-* } .-1 } f2(X<5>(), 5); f3(X<5>(), 5l); // { dg-error "no matching" } // { dg-message "(candidate|inconsistent with)" "candidate note" { target *-*-* } .-1 } f4(5, X<5>()); f4(5l, X<5>()); // { dg-error "no matching" } // { dg-message "(candidate|inconsistent with)" "candidate note" { target *-*-* } .-1 } f4((short)5, X<5>()); }