https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125230
--- Comment #7 from Rainer Deyke <rainerd at eldwood dot com> --- (In reply to Jonathan Wakely from comment #6) > (In reply to Rainer Deyke from comment #5) > > This is problematic because "importable header" is never defined. It can > > reasonably mean "any header" in a compiler that compiles header units on > > demand, in which case my header-only library cannot work at all. I believe > > this is a defect in the standard. > > It's defined in 10.3 [module.import] paragraph 5: > > "An importable header is a member of an implementation-defined set of > headers that includes all importable C++ library headers (16.4.2.3)." > > And 16.4.2.3 [headers] p2 says: > > "The headers listed in Table 24, or, for a freestanding implementation, the > subset of such headers that are provided by the implementation, are > collectively known as the importable C ++ library headers." That just confirms my point: the set of importable headers is implementation-defined (i.e. not defined by the standard). It is permitted for an implementation to treat all headers as importable headers. Therefore an implementation is allowed to turn all #includes into imports. Therefore any idiom that uses macros to pass information from a C++ source file to a header is no longer standard-conforming, even if #include is used exclusively.
