Page 1 of 1

Rule 3-2-3 and friend Declarations

Posted: Thu Sep 30, 2010 5:28 pm
by gs
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?

Re: Rule 3-2-3 and friend Declarations

Posted: Tue Oct 11, 2016 10:33 am
by misra cpp
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