8.27 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"
};
Related reference
7.156 --strict, --no_strict
Non-ConfidentialPDF file icon PDF versionARM DUI0375F
Copyright © 2007, 2008, 2011, 2012, 2014 ARM. All rights reserved.