|
| |
Special Environments
Special environments have constraints on what what languages features and
library functions may be used.
Examples
- Device driver and kernel programmers cannot call functions outside the
kernel. Neither can they use the exception handling feature because that
requires the run-time library too.
- Application programmers often cannot use the standard library because it
requires that the application ship with the C/C++ runtime library. This can
cause problems with other products if they require the original library and
your product installs the latest version
The Standard Library and Special Environments
The standard container library is still very important for special
environment programmers for a number of reasons.
- Many of the containers in the standard library are completely defined and
implemented in header files with no dependencies on a run-time library
(depending on the container, the specific implementation provided by the
compiler vendor and the specific constraints of your environment).
- Even if you cannot use the implementation of container provided by your
compiler vendor, you can still benefit greatly from the standard library:
Your custom container, if made to be compliant,
- Can be manipulated by the standard algorithms,
- Can be manipulated by the standard compliant algorithms your
colleagues write,
- Can be instantly understood by your colleagues who have studied the
standard library.
For these reasons, there is tremendous merit in studying the standard library
containers, iterators and algorithms even if your environment precludes their
direct use.
|