Atmel CAVR-4 Manual De Usuario

Descargar
Página de 323
CAVR-4
Part 1. Using the compiler
109
Using C++
IAR Systems supports two levels of the C++ language: The industry-standard 
Embedded C++ and IAR Extended Embedded C++. They are described in this 
chapter.
Overview
Embedded C++ is a subset of the C++ programming language which is intended for 
embedded systems programming. It was defined by an industry consortium, the 
Embedded C++ Technical Committee. Performance and portability are particularly 
important in embedded systems development, which was considered when defining the 
language.
STANDARD EMBEDDED C++
The following C++ features are supported:
Classes, which are user-defined types that incorporate both data structure and 
behavior; the essential feature of inheritance allows data structure and behavior to 
be shared among classes
Polymorphism, which means that an operation can behave differently on different 
classes, is provided by virtual functions
Overloading of operators and function names, which allows several operators or 
functions with the same name, provided that there is a sufficient difference in their 
argument lists
Type-safe memory management using operators 
new
 and 
delete
Inline functions, which are indicated as particularly suitable for inline expansion.
C++ features which have been excluded are those that introduce overhead in execution 
time or code size that are beyond the control of the programmer. Also excluded are 
recent additions to the ISO/ANSI C++ standard. This is because they represent potential 
portability problems, due to the fact that few development tools support the standard. 
Embedded C++ thus offers a subset of C++ which is efficient and fully supported by 
existing development tools.
Standard Embedded C++ lacks the following features of C++:
Templates 
Multiple and virtual inheritance 
Exception handling 
Runtime type information