Date: Wed, 03 Jul 2024 12:30:31 +0200
On Wednesday 3 July 2024 11:56:13 CEST Frederick Virchanza Gotham via Std-
Proposals wrote:
> But what if we could include
> a header file, and only keep the macroes we need? Something like:
>
> #include <Windows.h> keep MAXPATH, APIENTRY
Definitely not for #includes. Don't even go there. The preprocessor does not
know about the C and C++ code that it is parsing so this could at worst
extract macros, which is of very limited use in general scenarios.
Instead, work with Modules. The import statement can be extended.
Proposals wrote:
> But what if we could include
> a header file, and only keep the macroes we need? Something like:
>
> #include <Windows.h> keep MAXPATH, APIENTRY
Definitely not for #includes. Don't even go there. The preprocessor does not
know about the C and C++ code that it is parsing so this could at worst
extract macros, which is of very limited use in general scenarios.
Instead, work with Modules. The import statement can be extended.
-- Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org Principal Engineer - Intel DCAI Platform & System Engineering
Received on 2024-07-03 10:31:43