OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [template/] [sfinae2.C] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/19989
2
// Don't instantiate a function template if it would generate an
3
//   array of size zero.
4
 
5
// { dg-do compile }
6
 
7
template struct cl {
8
  const static int value = T;
9
};
10
 
11
template void fn (char (*) [cl::value] = 0 ); // { dg-error "zero-size array" }
12
 
13
void foo (void)
14
{
15
  fn<0> ();  // { dg-error "no matching function" }
16
  // { dg-message "candidate" "candidate note" { target *-*-* } 15 }
17
}
18
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.