C++ Logo


Advanced search

Re: [wg14/wg21 liaison] #once proposal

From: Christof Meerwald <cmeerw_at_[hidden]>
Date: Thu, 3 Feb 2022 21:08:01 +0100
On Thu, Feb 03, 2022 at 08:50:30PM +0100, Miguel Ojeda via Liaison wrote:
> On Thu, Feb 3, 2022 at 8:29 PM Steve Downey via Liaison
> <liaison_at_[hidden]> wrote:
> > Is there any chance that this gets adopted? Because at scale it doesn't work, and causes both structural and transient problems, and it will be even harder to get people not to use it if it's in the standard.
> Of course there is a chance -- as with any other proposal. The
> no-identifier form does have pitfalls depending on how a compiler
> defines it, but it is widely used everywhere. The paper is
> standardizing existing practice (and, by doing that, asking compilers
> to document it).

Existing practice is to use "#pragma once" which already has
implementation defined behavior - the paper proposes to change
"#pragma once" to "#once" with implementation defined behavior.
Doesn't really look like much of an improvement to me.


https://cmeerw.org                             sip:cmeerw at cmeerw.org
mailto:cmeerw at cmeerw.org                   xmpp:cmeerw at cmeerw.org

Received on 2022-02-03 20:08:06