Julie wrote:
"Steven T. Hatton" wrote:
If a header is not necessarily a source file, and the sequences delimited by
< and > in header names aren't necessarily valid source file names, what
exactly is a header?
A header is _necessarily_ a source file that is exclusively distinctly visible
by the preprocessor.
2.8 Header names [lex.header]
header-name:
<h-char-sequence>
"q-char-sequence"
h-char-sequence:
h-char
h-char-sequence h-char
h-char:
any member of the source character set except
new-line and >
q-char-sequence:
q-char
q-char-sequence q-char
q-char:
any member of the source character set except
new-line and "
1 Header name preprocessing tokens shall only appear within a #include
preprocessing directive (_cpp.include_) . The sequences in both forms
of header-names are mapped in an implementation-defined manner to
headers or to external source file names as specified in
_cpp.include_.
16.2 Source file inclusion [cpp.include]
1 A #include directive shall identify a header or source file that can
be processed by the implementation.
2 A preprocessing directive of the form
# include <h-char-sequence> new-line
searches a sequence of implementation-defined places for a header
identified uniquely by the specified sequence between the < and >
delimiters, and causes the replacement of that directive by the entire
contents of the header. How the places are specified or the header
identified is implementation-defined.
I don't see anything here requiring headers to be files. In fact, it
sounds like they went out of their way to make sure that was not implied
(e.g., "header _or_ source file").
-Kevin
--
My email address is valid, but changes periodically.
To contact me please use the address from a recent posting.