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• Functions can be "deleted". For example:int f(int) = delete;short f(short);int x = f(3);// Error: selected function is deleted.int y = f((short)3); // OK.• Special member functions can be explicitly "defaulted" (i.e., given a default definition). For example:struct S { S(S const&) = default; };struct T { T(T const&); };T::T(T const&) = default;• The operand of sizeof, typeid, or decltype can refer directly to a non-static data member of aclass without using a member access expression. For example:struct S {int i;};decltype(S::i) j = sizeof(S::i);• The keyword nullptr can be used as both a null pointer constant and a null pointer-to-memberconstant. Variables and other expressions whose type is that of the nullptr keyword (conventionallyknown by its standard typedef, std::nullptr_t) can also be used as null pointer(-to-member)constants, although they are only constant expressions if they otherwise would be. For example:#include // To get std::nullptr_tstruct S { };template struct X { };std::nullptr_t null();void f() {void *p = nullptr; // Initializes p to null pointerint S::* mp = nullptr; // Initializes mp to null ptr-to-memberp = null();// Sets p to null pointer}X xnull0;X xnull1;// Instantiates X with null int * value// Error: template argument not a// constant expression• Attributes delimited by double square brackets ([[ ... ]]) are accepted in declarations.The standardattributes align, noreturn, nothrow, final, and carries_dependency are supported. Forexample:[[nothrow]] void f();• Alias and alias template declarations are supported. For example:43

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

Saved successfully!

Ooh no, something went wrong!