[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Friends cannot be protected or private

On Wed, Sep 28, 2005 at 11:58:15AM -0500, Adam Majer wrote:
> I found one
> http://gcc.gnu.org/ml/gcc/2005-01/msg01760.html
> and a link from there to,
> http://www.open-std.org/JTC1/SC22/WG21/docs/cwg_closed.html#209
> I don't understand the reasons for using access control in the friend
> statements except that it probably makes access control easier to write
> and apply in the compiler (ie. less exceptions)

The reason (from GCC's POV) is to be compliant with the standard.  The
reasoning for leaving it that way in the standard is, I think, pretty
well explained at the bottom of the Rationale in the WG notes.

Daniel Jacobowitz
CodeSourcery, LLC

Reply to: