You copied the Doc URL to your clipboard.

friend

A friend declaration for a class can omit the class keyword.

Access checks are not carried out on friend declarations by default. Use the --strict command-line option to force access checking.

Example

class B;
class A
{
    friend B;  // is the same as "friend class B"
};
Was this page helpful? Yes No