[Bug c++/124154] [this auto] ICE when handling lambda with `this auto`.

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Feb 18 15:12:16 GMT 2026


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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Testcase for the decltype(nullptr) case:
constexpr decltype(nullptr) bar (bool x) { if (x) throw 1; return nullptr; }
template <decltype(nullptr) I = bar (true)>
constexpr void foo () {}

consteval {
  foo <> ();
}


More information about the Gcc-bugs mailing list