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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 693 jeremybenn
// Test that the synthesized C copy constructor calls the A template
2
// constructor and has the appropriate exception specification.
3
// { dg-options -std=c++0x }
4
// { dg-do run }
5
 
6
int r = 1;
7
 
8
struct A
9
{
10
  A() {}
11
  A(const A&) throw () { }
12
  template 
13
  A(T& t) { r = 0; }
14
};
15
 
16
struct B
17
{
18
  B() {}
19
  B(B&) throw () { }
20
};
21
 
22
struct C: A, B { };
23
 
24
#define SA(E) static_assert(E, #E)
25
 
26
C c;
27
SA (!noexcept(C(c)));
28
 
29
int main()
30
{
31
  (C(c));
32
  return r;
33
}

powered by: WebSVN 2.1.0

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