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