repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
PR c++/86728 - C variadic generic lambda.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
implicit2.C
blob
2995894424f17a4e31d80804e77ce535406fa627
1
// Test that the synthesized C copy constructor calls the A template
2
// constructor and has the appropriate exception specification.
3
// { dg-do run { target c++11 } }
4
5
int r = 1;
6
7
struct A
8
{
9
A() {}
10
A(const A&) throw () { }
11
template <class T>
12
A(T& t) { r = 0; }
13
};
14
15
struct B
16
{
17
B() {}
18
B(B&) throw () { }
19
};
20
21
struct C: A, B { };
22
23
#define SA(E) static_assert(E, #E)
24
25
C c;
26
SA (!noexcept(C(c)));
27
28
int main()
29
{
30
(C(c));
31
return r;
32
}