MISRA Discussion Forums

Full Version: 0-1-8 and OO design pattern
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
0-1-8 restricts such elegant design pattern as e. g. observer/listener (with selective handling of a subset of notifications by observer).
So is the "intended" use of empty virtual methods due to design OK? May design goals be classified as "side effect"?
Design goals cannot be considered as side effects, as they are not machine checkable. The use of design patterns such as suggested may always be permitted by deviation.

Whether explicit exceptions are required for this rule may be considered for a future edition