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


class B;
class A
    friend B;  // is the same as "friend class B"
Related reference
8.173 --strict, --no_strict
Non-Confidential PDF file icon PDF version ARM DUI0472J
Copyright © 2010-2013 ARM. All rights reserved.