Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/cpp1z/class-deduction45.C @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children | 84e7813d76e9 |
rev | line source |
---|---|
111 | 1 // PR c++/82308 |
2 // { dg-options -std=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 } |