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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [template/] [sfinae15.C] - Blame information for rev 307

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

Line No. Rev Author Line
1 301 jeremybenn
// PR c++/40944
2
// { dg-options -std=c++0x }
3
// { dg-do run }
4
 
5
template
6
struct make { static T&& it(); };
7
 
8
void (*pf)(int&) = 0;
9
 
10
template< typename T >
11
int bar(T const& x,
12
        decltype( pf(make::it()) )* = 0 // SFINAE!
13
        ) {
14
    return 1;
15
}
16
 
17
int bar(...) {
18
    return 0;
19
}
20
 
21
int main() {
22
    return bar(42);
23
}

powered by: WebSVN 2.1.0

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