view gcc/testsuite/g++.dg/template/deduce3.C @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
line wrap: on
line source

template <typename T>
void f(int, T (*)() = 0);	// { dg-message "note" "note" }

void g() {
  typedef int A[2];
  f<A>(0); // { dg-error "" }
  // { dg-error "returning an array" "returning an array" { target *-*-* } 2 }
  typedef void F();
  f<F>(0); // { dg-error "" }
  // { dg-error "returning a function" "returning a function" { target *-*-* } 2 }
}