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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [sfinae6.C] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/48113
2
// { dg-options -std=c++0x }
3
 
4
template T declval();
5
 
6
struct tuple { };
7
 
8
struct F1
9
{
10
    void operator()(tuple, int);
11
};
12
 
13
typedef void (*F2)(tuple, int);
14
 
15
template
16
struct Bind
17
{
18
    template
19
             typename R = decltype( F()(declval(), A()) )>
20
    R f(A);
21
 
22
    template
23
             typename R = decltype( F()(declval(), A()) )>
24
    R f(A) volatile;
25
};
26
 
27
int main()
28
{
29
    Bind().f(0);  // OK
30
    Bind().f(0);  // ERROR, should be OK
31
}

powered by: WebSVN 2.1.0

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