Rule M16-1-2 (required, implementation, automated)
All #else, #elif and #endif pre-processor directives shall reside in the same file as the #if or #ifdef directive to which they are related. See MISRA C++ 2008 [7] Note: “#if”, “#elif”, “#else” and “#ifded” are anyway only allowed for conditional file inclusion, see A16-0-1. This rule is kept in case A16-0-1 is disabled in a project.