2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1z / class-deduction45.C
blob6f72b5f15ae4cf207609184e61ada2a0d8cf3b5c
1 // PR c++/82308
2 // { dg-do compile { target c++17 } }
4 template<typename, unsigned>
5 struct array {};
7 template <unsigned R>
8 class X {
9 public:
10   using T = array<int, R>;
12   enum class C : char { A, B };
13   X(T bounds, C c = C::B) : t(bounds) {}
15 private:
16   T t;
19 int main()
21   array<int, 2> a;
22   X    d{a};
23   X<2> e{a};