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 in a class template may refer to an undeclared template.template struct A {friend void f(A);};• A friend class template declaration in which the template parameter list does not match the originaldeclaration is accepted if the class template name is specified as a qualified name.namespace N {template struct A { };}struct B {template friend struct N::A;};• When gnu_version is < 30400, the semantic analysis of a friend function defined in a class template isper<strong>for</strong>med only if the function is actually used and is done at the end of the translation unit (instead ofat the point of first use).• A function template default argument may be redeclared. A warning is issued and the default from theinitial declaration is used.template void f(int i = 1);template void f(int i = 2){}int main() {f();}• A definition of a member function of a class template that appears outside of the class may specify adefault argument.template struct A { void f(T); };template void A::f(T value = T() ) { }• Function declarations (that are not definitions) can have duplicate parameter names.void f(int i, int i); // Accepted in GNU C++ mode• Default arguments are retained as part of deduced function types.• A namespace member may be redeclared outside of its namespace.• A template may be redeclared outside of its class or namespace.namespace N {template< typename T > struct S {};56

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

Saved successfully!

Ooh no, something went wrong!