0-1-8 and OO design pattern

Moderators: david ward, misra cpp

Post Reply
masha
Posts: 1
Joined: Mon Oct 01, 2012 6:48 pm
Company: AgBRAIN

0-1-8 and OO design pattern

Post by masha » Tue Oct 02, 2012 7:03 am

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

misra cpp
Posts: 148
Joined: Mon Jun 02, 2008 1:55 pm
Company: MISRA

Re: 0-1-8 and OO design pattern

Post by misra cpp » Tue Oct 11, 2016 10:04 am

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
Posted by and on behalf of
the MISRA C++ Working Group

Post Reply

Return to “6.0 Language independent issues (C++)”