13.07.2015 Views

TASKING VX-toolset for ARM User Guide

TASKING VX-toolset for ARM User Guide

TASKING VX-toolset for ARM User Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>TASKING</strong> <strong>VX</strong>-<strong>toolset</strong> <strong>for</strong> <strong>ARM</strong> <strong>User</strong> <strong>Guide</strong>• A friend declaration may refer to a member typedef.class A {class B {};typedef B my_b;friend class my_b;};• When a friend class is declared with an unqualified name, the lookup of that name is not restricted tothe nearest enclosing namespace scope.struct S;namespace N {class C {friend struct S; // ::S in g++ mode,// N::S in default mode};}• A friend class declaration can refer to names made visible by using-directives.namespace N { struct A { }; }using namespace N;struct B {void f() { A a; }friend struct A; // in g++ mode N::A,}; // not a new declaration of ::A• Friend injection is enabled if gnu_version is < 40100 and disabled otherwise.class X {friend void f(X*);friend class Y;};int main() {Y* y; // Y not declared without friend injectionf(0); // f not declared without friend injection}• When friend names are not injected, they can still be used in qualified declarator names whengnu_version < 40300.namespace N {class A {friend int f();};}int N::f() { return 0; } // OK when gnu_version < 4030054

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!