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
2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
DRs
/
dr2137-1.C
blob
ad6b5325a1e72884637588b106669edc2c301f91
1
// DR 2137
2
// { dg-do run { target c++11 } }
3
4
// Test that an initializer_list constructor beats the copy constructor.
5
6
#include <initializer_list>
7
8
bool ok = false;
9
10
struct Q {
11
Q() = default;
12
Q(Q const&) = default;
13
Q(Q&&) = default;
14
Q(std::initializer_list<Q>) { ok = true; }
15
};
16
17
int main() {
18
Q x = Q { Q() };
19
if (!ok) __builtin_abort ();
20
}