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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

C++ Language}template< typename T > struct N::S;• The injected class name of a class template can be used as a template argument.template struct A {};template struct B {A a;};• A partial specialization may be declared after an instantiation has been done that would have used thepartial specialization if it had been declared earlier. A warning is issued.template class X {};X xi;template class X {};• A static data member may be explicitly specialized after it has been used. A warning is issued.template struct A {static int i;};int j = A::i;template int A::i = 1;• The "." or "->" operator may be used in an integral constant expression if the result is an integral orenumeration constant:struct A { enum { e1 = 1 }; };int main () {A a;int x[a.e1]; // Accepted in GNU C++ modereturn 0;}• Strong using-directives are supported.using namespace debug __attribute__((strong));• Partial specializations that are unusable because of nondeductible template parameters are acceptedand ignored.template struct A {class C { };};template struct B {enum {e = 1}; };template struct B {enum {e = 2}; };int main(int argc, char **argv) {printf("%d\n", B::e);57

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

Saved successfully!

Ooh no, something went wrong!