C++ Logo

sg15

Advanced search

Re: "logical name" of importable headers

From: Daniel Ruoso <daniel_at_[hidden]>
Date: Fri, 3 Jun 2022 16:30:16 -0400
Em sex., 3 de jun. de 2022 às 15:52, Gabriel Dos Reis
<gdr_at_[hidden]> escreveu:
> Since the standards allow any C++ header (other that those inherited from C)
> to include any other C++ header, it follows that any C++ header can - in fact -
> include the entire standard library. Consequently, I suspect an implementation
> is permitted to replace #include of such standard headers with 'import std;'
> in C++23 and up

I can easily see consolidating a number of related headers into a
single header unit import, but I don't think we can transparently
switch to named modules without a significant behavior change, because
of macros.

daniel

Received on 2022-06-03 20:30:27