URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [template/] [sfinae2.C] - Rev 801
Go to most recent revision | Compare with Previous | Blame | View Log
// PR c++/19989
// Don't instantiate a function template if it would generate an
// array of size zero.
// { dg-do compile }
template<int T> struct cl {
const static int value = T;
};
template<int I> void fn (char (*) [cl<I>::value] = 0 ); // { dg-error "zero-size array" }
void foo (void)
{
fn<0> (); // { dg-error "no matching function" }
// { dg-message "candidate" "candidate note" { target *-*-* } 15 }
}
Go to most recent revision | Compare with Previous | Blame | View Log