Compiler is crashing when instantiated default argument marked as not.
When a default constructor is dllexport-ed, a closure is generated. A closure is a first-class function along with its surrounding state. It is able (unlike lambda function)
to interact with the outside environment, i.e refers to variables in the outer scope. For the closure to be in a "close" state, it needs its own local parameters.
This patch adds instantiated parameters to the closure.
What is the MS extension that makes this necessary? Why does the normal inherited default arg not do anything here?
Can you better explain in the commit message what you think is wrong here? Why would this happen only with dll_export, and not the other mechanisms for making 'foo' be emitted?