3 ms·
#include is a preprocessor directive that substitutes the text of a file in place. import declares that this translation unit should link to a specified module
by Conscat 3y ago
#include is a preprocessor directive that substitutes the text of a file in place. import declares that this translation unit should link to a specified module unit. Usually there would only be a single translation unit for the entire program in the latter case, which obsoletes IPO/LTO (except when you have statically linked libraries), and means internal linkage functions (everything that is template, inline, or constexpr) do not have to be redundantly recompiled. That also means there would be no distinction between inline variables and static variables. This obsoletes unity builds and precompiled headers.