Or will we get:
// x.cpp //
#include <mylibrary>
// mylibrary //
#ifdef __cpp_modules
import mylibrary
#include "mylibrary_imported.h"
#else
#include "mylibrary_nomodules.h"
#endif
-----Ursprüngliche Nachricht-----
Von: Marcin Jaczewski <marcinjaczewski86@gmail.com>
Gesendet: Mo 24.03.2025 23:16
Betreff: Re: [std-proposals] #pragma once safer alternative
An: std-proposals@lists.isocpp.org;
CC: Sebastian Wittmeier <wittmeier@projectalpha.org>;
pon., 24 mar 2025 o 21:39 Sebastian Wittmeier via Std-Proposals
<std-proposals@lists.isocpp.org> napisaĆ(a):
>
> Hi Marcin,
>
>
>
> import your_library;
> #include "your_library_imported.h"
> #include "third_party/A.h" // #include "your_library/a_header.h" but got skipped
>
>
>
> Wouldn't it be good, if import automatically (and optionally) includes a header file specified by the library module?
>
> Or it would not work as #include is for the preprocessor, whereas import is not?
>
It probably should not work, only `import "your_library.h";` could in
theory work but only when we have include guards.
But I have some doubts if any one will implement this version of
`import` any time soon.