URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [sfinae13.C] - Rev 709
Go to most recent revision | Compare with Previous | Blame | View Log
// PR c++/48581
// { dg-options -std=c++0x }
template<class T>
T&& create();
template<class T,
class = decltype(foo(create<T>()))
>
auto f(int) -> char;
template<class>
auto f(...) -> char (&)[2];
struct S {};
void foo(S);
static_assert(sizeof(f<S>(0)) == 1, "Error"); // (#)
int main() {}
Go to most recent revision | Compare with Previous | Blame | View Log