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.
(Indentation is off here.)
But mainly, I think you need to explain this. Why does a class having a default constructor and being dllexport imply that any decl in that class has local scope?