C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Revising #pragma once

From: Ville Voutilainen <ville.voutilainen_at_[hidden]>
Date: Tue, 27 Aug 2024 21:59:24 +0300
On Tue, 27 Aug 2024 at 21:27, Jeremy Rifkin <rifkin.jer_at_[hidden]> wrote:
>
> I’m not sure I’m following, sorry. Are you saying we can’t solve the problem of implementation divergence because implementations diverge? Or are you suggesting the chicken and egg problem that implementations must agree on their own standard first? If so, what’s the point of the ISO standard?
>
> Filesystem id and paths are under-approximations tor the same header contents. This proposal should make things more robust. The impact on existing code is that previous #pragma once use where different files were being included more than once will now exhibit single inclusion behavior. Outside of niche cases where you are including a #pragma once header with only macros, undefining everything, and then re-including another copy, I’m not seeing any way current well-formed code could be impacted.

..and you have tested this.. ..with what? Do you have an
implementation of this proposal?

The question is, if this were to be standardized, why would the
implementations that implement something different change? If it's an
obvious
improvement, why haven't they just incorporated it already?

That's the question I'm asking; it would be rather unfortunate to
attempt to standardize a #once and then have implementation vendors
say
"that doesn't work, we can't do it that way, we need $this and $that
instead". Such situations should be avoided before we put something
into the ink of a standard. So, what steps have you taken to ensure
that the proposal is acceptable to all vendors?

Received on 2024-08-27 18:59:38