[Bug c++/103186] [11/12 Regression] ICE with lambdas as default since r11-7965-g23be03a0f243a084

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Dec 7 01:00:55 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103186

--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Just lambdas as default is needed really, reduced testcase:
struct f
{
  template<class T1>
   f(const T1&){}
};


template<typename T> class A {
public:
    void foo(A<T> a, const f& fn = [](){}) { }
    void bar(A<T> a) { foo(a); }
};
int main() {
    A<int> a;
    a.foo(a);
    a.bar(a);
    return 0;
}


More information about the Gcc-bugs mailing list