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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/37208: SFINAE and deleted functions.
2
 
3
// { dg-options "-std=c++0x" }
4
// { dg-do compile }
5
template struct A { };
6
 
7
template
8
int& int_if_addable(A*);
9
 
10
template
11
float& int_if_addable(...);
12
 
13
struct X { };
14
 
15
struct Y { };
16
Y operator+(Y, Y);
17
 
18
struct Z { };
19
Z operator+(Z, Z) = delete;
20
 
21
void f()
22
{
23
 float& x = int_if_addable(0);
24
 int& y = int_if_addable(0);
25
 float& z = int_if_addable(0);
26
}

powered by: WebSVN 2.1.0

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