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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #1)
> MSVC rejects the default argument usage:
> 
> <source>(8): error C2587: 'n': illegal use of local variable as default
> parameter
> <source>(3): note: see declaration of 'n'
> <source>(9): error C2587: 'n': illegal use of local variable as default
> parameter
> <source>(3): note: see declaration of 'n'

And lambda usage:
<source>(4): error C3493: 'n' cannot be implicitly captured because no default
capture mode has been specified

But accepts the usage in local class.

Reply via email to