One of the facilities C++ modules provides is turning header files into
header units. Thus you can say:
import <iostream>;
(there are some constraints on being able to do that)
This involves compiling the header file, similar to PCH. However,
needing to provide the full path to the header file on the command line
is awkward, and creates adoption friction, because it's one of the first
thing someone might do.
So, I've added a mechanism to search:
g++ --lang c++ -std=c++17 -fmodule-header -search-system iostream
I've decoupled these new options from what one does with the file (hence
the -fmodule-header), or what language (hence --lang c++).
Question: Are -search-system and -search-user sensible names? Should
they be more clearly tied to the main file?
More weedful: I contemplated permitting '<iostream>' and '"foo"' to
indicate this, but (a) our specs pattern matcher doesn't really work
that way, and <, >, " are all shell meta-characters.
nathan
--
Nathan Sidwell