Atmel CAVR-4 Manual De Usuario

Descargar
Página de 323
CAVR-4
110
Overview
AVR® IAR C/C++ Compiler
Reference Guide
New cast syntax (the operators 
dynamic_cast
static_cast
reinterpret_cast
, and 
const_cast
)
Namespaces
Mutable attribute.
The exclusion of these language features makes the runtime library significantly more 
efficient. The Embedded C++ library furthermore differs from the full C++ library in 
that:
The standard template library (STL) is excluded
Streams, strings, and complex numbers are supported without the use of templates
Library features which relate to exception handling and runtime type information 
(the headers 
except
stdexcept,
 and 
typeinfo
) are excluded.
Note: The library is not in the 
std
 namespace, because Embedded C++ does not 
support namespaces.
IAR EXTENDED EMBEDDED C++
IAR Extended EC++ is a slightly larger subset of C++ which adds the following features 
to the standard EC++:
Full template support
Multiple and virtual inheritance
Namespace support
Mutable attribute
The cast operators 
static_cast
const_cast
, and 
reinterpret_cast
.
All these added features conform to the C++ standard.
To support Extended EC++, this product includes a version of the standard template 
library (STL), in other words, the C++ standard chapters utilities, containers, iterators, 
algorithms, and some numerics. This STL does neither use exceptions and multiple 
inheritance, nor does it use runtime type information (
rtti
). Moreover, the library is 
not in the 
std
 namespace.
Note: A module compiled with Extended EC++ enabled is fully link-compatible with 
a module compiled without Extended EC++ enabled.
ENABLING C++ SUPPORT
In the AVR IAR C/C++ Compiler, the default language is C. To be able to compile files 
written in Embedded C++, you must use the 
--ec++
 compiler option. See --ec++, page 
179. You must also use the IAR DLIB runtime library.
To take advantage of Extended Embedded C++ features in your source code, you must 
use the 
--eec++
 compiler option. See --eec++, page 180.