3.5.3. 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.


class B;
class A
    friend B;  // is the same as "friend class B"

See also

Copyright © 2007, 2010 ARM Limited. All rights reserved.ARM DUI 0348A