C1134: Static data members are not allowed in local classes

[ERROR]

Description

Static members of a local class have no linkage and cannot be defined outside the class declaration. It follows that a local class cannot have static data members.

Example
  void foo(void){

  
    class A{

  
    public:

  
      static int a; // ERROR because static data member

  
      static void myFct(void); // OK because static method

  
    };

  
  }

  
Tips

Remove the static specifier from the data member declarations of any local class.

  void foo(void){

  
    class A{

  
    public:

  
      int a; // OK because data member.

  
      static void myFct(void); // OK because static method

  
    };

  
  }