C++ Logo

sg15

Advanced search

[D1689R5] Draft addition of the `is-interface` key

From: ben.boeckel_at <ben.boeckel_at_[hidden]>
Date: Fri, 13 May 2022 16:37:13 -0400
Hi,

Attached is a draft of P1689R5 with a proposed naming of the key for
providing "is this provided module part of the interface" information.
For C++, this means "has the `export` keyword. In order to avoid a
bikeshed round of meeting time, I'd like to read the winds as to how
this should be named:

  - `"is-interface"` (defaults to `true`): the draft has this
  - `"interface"` (defaults to `true`)
  - `"internal"` (defaults to `false`)
  - `"exported"` (defaults to `true`)

I think it would be best to avoid using the C++ keyword unless it is
actually the best term for it because this format would be immensely
useful for Fortran as well where just slapping `export` on there because
C++ made the key might muddy the waters if Fortran ends up with similar
functionality under a different keyword which confuses things.

Orthogonally, there's also the question of:

  - no default value (it must always be present in the file)

Note that, as far as I know, the only reason we need this information
for building modules in the first place is to provide the appropriate
`-interface` or `-internalPartition` flag to MSVC for compilation for
the source file. Is this useful for static analysis or other tools as
well (AFAIK, this information is readily available by anything that can
read the source anyways)?

Thanks,

--Ben

Received on 2022-05-13 20:36:34