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 .