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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [g++.dg/] [template/] [sfinae2.C] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
// 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 );
12
 
13
void foo (void)
14
{
15
  fn<0> ();  // { dg-error "no matching function" }
16
}
17
 

powered by: WebSVN 2.1.0

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