MISRA Discussion Forums
0-1-8 and OO design pattern - Printable Version

+- MISRA Discussion Forums (https://forum.misra.org.uk)
+-- Forum: MISRA C++ (https://forum.misra.org.uk/forumdisplay.php?fid=18)
+--- Forum: MISRA C++:2008 rules (https://forum.misra.org.uk/forumdisplay.php?fid=19)
+---- Forum: 6.0 Language independent issues (C++) (https://forum.misra.org.uk/forumdisplay.php?fid=129)
+---- Thread: 0-1-8 and OO design pattern (/showthread.php?tid=916)



0-1-8 and OO design pattern - masha - 02-10-2012

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"?


Re: 0-1-8 and OO design pattern - misra cpp - 11-10-2016

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