1 // { dg-do compile { target c++17 } } 2 3 template<class, int> 4 struct Array {}; 5 6 template<class T, int size_> 7 struct Foo { sizeFoo8 static constexpr int size() { 9 return size_; 10 } 11 12 template<class U> FooFoo13 Foo(U, Array<T, size()>) {} 14 }; 15 16 template<class T, int size, class U> 17 Foo(U, Array<T, size>) -> Foo<T, size>; 18 main()19int main() { 20 Array<int, 2> arr{}; 21 22 Foo foo{2.0, arr}; 23 } 24