'name' : uses 'identifier' in local class 'class' causing compiler-generated special member functions
The declaration of the member identifier caused the compiler to generate an assignment operator, default constructor, or other member function for the class. Because local classes cannot define member functions, an error results.
Members that are references or const can be initialized but cannot be assigned new values. They require the compiler to generate an assignment operator and a default constructor.
Example
void f() { class C // local class { const int i; // error: const member }; C c; // constructor needed to initialize c.i }