C++ Logo

sg15

Advanced search

Re: "logical name" of importable headers

From: Richard Smith <richardsmith_at_[hidden]>
Date: Fri, 3 Jun 2022 12:49:53 -0700
On Fri, 3 Jun 2022 at 11:24, Daniel Ruoso via SG15 <sg15_at_[hidden]>
wrote:

> Em sex., 3 de jun. de 2022 às 13:55, Daniela Engert via SG15
> <sg15_at_[hidden]> escreveu:
> > On a tangent, what I really miss is metadata (possibly living besides the
> > BMI) which is telling the compiler and build tools which header files a
> > (named) module is replacing such that #include <lib/some/header.hpp>
> > would be automatically translated into import lib;
>
> That is interesting, but I don't know if the standard allows that. The
> only thing the standard predicts is replacing `#include <foo.h>` by
> `import <foo.h>`.
>

There's a lot of freedom in how headers and source files are found and what
their contents are. Nothing stops a conforming implementation from saying
"I found <lib/some/header.hpp> in *waves hands around generally* and its
contents are `import <foo.h>;`".

Received on 2022-06-03 19:50:06