Rule 3-2-3 and friend Declarations
Moderators: david ward, misra cpp
-
- Posts: 87
- Joined: Thu Nov 18, 2004 1:39 am
Rule 3-2-3 and friend Declarations
Am I correct in presuming rule 3-2-3 does not apply to friend declarations? For example, if I declare a class type in a header file, am I permitted to declare that class as a friend of another type in a different file?
-
- Posts: 154
- Joined: Mon Jun 02, 2008 1:55 pm
- Company: MISRA
Re: Rule 3-2-3 and friend Declarations
This rule does not preclude the use of friend or forward reference statements, but these must be in a separate header file.
A future edition may reconsider this point
A future edition may reconsider this point
Posted by and on behalf of
the MISRA C++ Working Group
the MISRA C++ Working Group