Debian Codegraph @

gcc/testsuite/g++.dg/cpp2a/array-conv13.C

raw
1 // PR c++/91364 - Implement P0388R4: Permit conversions to arrays of unknown bound.
2 // { dg-do compile { target c++20 } }
3
4 template <typename T> void foo(T);
5
6 template <typename F, typename T, typename = decltype(foo<T>(F()))>
7 void test(int) { }
8
9 // No other overload, so if the above fails because of the conversion,
10 // we fail.
11
12 void
13 fn ()
14 {
15 test<int(*)[2], int(*)[]>(0);
16 test<int(*)[], int(*)[]>(0);
17 }