Date: Fri, 26 May 2023 13:44:36 +0200
On 26/05/2023 11.23, Mathias Stearn wrote:
> Perhaps we mostly disagree on the framing though. My take is that the problem here _isn't_ that foo.h was declared as importable. The problem is that qux.h is trying to change the meaning of the foo.h header.
That's a fine interpretation from my point of view.
CWG2732 will clarify that any macros that happen to be active at the
point of import have no bearing on the contents of an importable header:
https://cplusplus.github.io/CWG/issues/2732.html
That still allows to set -DDEBUG in your user-defined "list of
importable headers" for this particular header (or more globally),
if you so feel.
Jens
> Perhaps we mostly disagree on the framing though. My take is that the problem here _isn't_ that foo.h was declared as importable. The problem is that qux.h is trying to change the meaning of the foo.h header.
That's a fine interpretation from my point of view.
CWG2732 will clarify that any macros that happen to be active at the
point of import have no bearing on the contents of an importable header:
https://cplusplus.github.io/CWG/issues/2732.html
That still allows to set -DDEBUG in your user-defined "list of
importable headers" for this particular header (or more globally),
if you so feel.
Jens
Received on 2023-05-26 11:44:44