https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101921
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Last reconfirmed| |2021-08-15
Summary|G++ cannot find a template |G++ cannot find a template
|function with lambda as |function with lambda as
|default template argument |default template argument
| |inside a template
Status|UNCONFIRMED |NEW
Keywords| |rejects-valid
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
if foo was not a template function, then bar would work.
Confirmed.