// { dg-do compile { target c++20 } } static decltype([] { }) f(); static decltype([] { }) f(); // { dg-error "ambiguating" } static decltype([] { }) g(); static decltype(g()) g(); // okay static void h(decltype([] { }) *) { } static void h(decltype([] { }) *) { } void x1() { h(nullptr); } // { dg-error "ambiguous" } using A = decltype([] { }); static void i(A *); static void i(A *) { } void x2() { i(nullptr); } // okay template using B = decltype([] { }); static void j(B *) { } static void j(B *) { } void x3() { j(nullptr); } // { dg-error "ambiguous" } template static void k(decltype([]{ return 0; }())); template static void k(decltype([]{ return 0; }())); // okay template static void k(int); // okay