That's one part of it.

The second part is that the attribute might not be inherited. It could be part of the co-variance principle (overriding methods may be more lax in what they accept - note that this is a principle from type theory, NOT C++), or it could simply be an implementation issue.

Or the attribute could simply be not enforced. Do you know if the compiler actually uses flow analysis to enforce the attribute?