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>using X = int;X x; // equivalent to "int x"template using Y = T*;Y yi; // equivalent to "int* yi"2.2.3. Anachronisms AcceptedThe following anachronisms are accepted when anachronisms are enabled (with --anachronisms):• overload is allowed in function declarations. It is accepted and ignored.• Definitions are not required <strong>for</strong> static data members that can be initialized using default initialization.The anachronism does not apply to static data members of template classes; they must always bedefined.• The number of elements in an array may be specified in an array delete operation. The value isignored.• A single operator++() and operator--() function can be used to overload both prefix and postfixoperations.• The base class name may be omitted in a base class initializer if there is only one immediate baseclass.• Assignment to this in constructors and destructors is allowed. This is allowed only if anachronismsare enabled and the "assignment to this" configuration parameter is enabled.• A bound function pointer (a pointer to a member function <strong>for</strong> a given object) can be cast to a pointer toa function.• A nested class name may be used as a non-nested class name provided no other class of that namehas been declared. The anachronism is not applied to template classes.• A reference to a non-const type may be initialized from a value of a different type. A temporary iscreated, it is initialized from the (converted) initial value, and the reference is set to the temporary.• A reference to a non-const class type may be initialized from an rvalue of the class type or a derivedclass thereof. No (additional) temporary is used.• A function with old-style parameter declarations is allowed and may participate in function overloadingas though it were prototyped. Default argument promotion is not applied to parameter types of suchfunctions when the check <strong>for</strong> compatibility is done, so that the following declares the overloading oftwo functions named f:int f(int);int f(x) char x; { return x; }Note that in C this code is legal but has a different meaning: a tentative declaration of f is followed byits definition.44

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

Saved successfully!

Ooh no, something went wrong!