[C++20] [Modules] [std module] Implicitly import std if standard library header is included #138906
Labels
clang:modules
C++20 modules and Clang Header Modules
libc++
libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
What do you think about the following idea: add a preprocessor macro that replaces content of the header with
import std;
if the macro is defined by user.For example libcxx/include/vector can be changed in the following way:
Motivation:
import std;
in standard library header would improve compile times if module std is available.import std;
for big projects is not trivial. The above approach eases that migrationThe text was updated successfully, but these errors were encountered: