Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/cpp1z/class-deduction45.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 // PR c++/82308 |
131 | 2 // { dg-do compile { target c++17 } } |
111 | 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 } |