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
/
cpp1z
/
class-deduction45.C
blob
6f72b5f15ae4cf207609184e61ada2a0d8cf3b5c
1
// PR c++/82308
2
// { dg-do compile { target c++17 } }
3
4
template<typename, unsigned>
5
struct array {};
6
7
template <unsigned R>
8
class X {
9
public:
10
using T = array<int, R>;
11
12
enum class C : char { A, B };
13
X(T bounds, C c = C::B) : t(bounds) {}
14
15
private:
16
T t;
17
};
18
19
int main()
20
{
21
array<int, 2> a;
22
X d{a};
23
X<2> e{a};
24
}