The reason why inner classes cannot have static members is because static members are usually instantiated when the program starts . However, an inner class depends on having an instance of its enclosing class in order to create it and then access it’s members.
Read moreCan a class have a static inner class in C++?
If you declared a class type definition as static anywhere (nested or not nested), you’d get a compiler warning and it will be stripped off. Classes cannot have storage class specifiers and static has been repurposed something different inside a class .
Read more