C++ Logo

sg15

Advanced search

Re: "logical name" of importable headers

From: Gabriel Dos Reis <gdr_at_[hidden]>
Date: Fri, 3 Jun 2022 20:48:32 +0000
[Daniel]

> I mean macros that end up being defined because you included a standard header.

So, that would be standard macros then.
Do you see silent semantics change, or a loud compilation break?
Any example?

-- Gaby

-----Original Message-----
From: Daniel Ruoso <daniel_at_ruoso.com>
Sent: Friday, June 3, 2022 1:45 PM
To: Gabriel Dos Reis <gdr_at_microsoft.com>
Cc: sg15_at_lists.isocpp.org
Subject: Re: [SG15] "logical name" of importable headers

I mean macros that end up being defined because you included a standard header.

Em sex., 3 de jun. de 2022 às 16:43, Gabriel Dos Reis
<gdr_at_[hidden]> escreveu:
>
> By that do you mean:
> 1. standard macros?
> 2. non-standard macro that change the implementation behavior?
>
> -- Gaby
>
> -----Original Message-----
> From: Daniel Ruoso <daniel_at_[hidden]>
> Sent: Friday, June 3, 2022 1:30 PM
> To: Gabriel Dos Reis <gdr_at_microsoft.com>
> Cc: sg15_at_[hidden]
> Subject: Re: [SG15] "logical name" of importable headers
>
> Em sex., 3 de jun. de 2022 às 15:52, Gabriel Dos Reis
> <gdr_at_microsoft.com> 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:48:39