> Because "cout" is not mentioned in that list, I'd assume it does not need run-time support,
> so I could, infact, write a hello world program with no run-time support.
Stroustrup states that "
individual C++ expressions and statements" other than those mentioned require no run-time support.
What this means is that for these, executable machine level instructions are generated at compile time; no extra run-time environment or library over and above the basic platform/hardware on which the program runs is required.
std::cout requires the support of a run-time library, the header
<iostream> need not be (typically would not be) available in freestanding implementations.
Two kinds of implementations are defined: a hosted implementation and a freestanding implementation. For a hosted implementation, this International Standard defines the set of available libraries. A freestanding implementation is one in which execution may take place without the benefit of an operating system, and has an implementation-defined set of libraries that includes certain language-support libraries.
...
A freestanding implementation has an implementation-defined set of headers. This set shall include at least the headers shown in Table 19. - IS |
The headers listed in table 19 include a few that require run-time support for language features; for instance the headers
<new>,
<exception> and
<typeinfo>
For instance, in the GNU implementation, there are two libraries: libsupc++ required by all implementations including freestanding implementations (support for language features like dynamic memory management, run-time type information and exception handling) and libstdc++ (the rest of the standard library for hosted implementations).