| 1 |
// { dg-do compile { target c++20 } } |
| 2 |
|
| 3 |
template <int N> void foo(const char (*s)[([]{}, N)]) {} |
| 4 |
template <class T> void spam(decltype([]{}) (*s)[sizeof(T)]) {} |
| 5 |
|
| 6 |
int main() |
| 7 |
{ |
| 8 |
foo<1>(nullptr); |
| 9 |
spam<char>(nullptr); |
| 10 |
} |
| 11 |
|
| 12 |
// { dg-final { scan-assembler-not "weak.*_Z" } } |