C++ Logo


Advanced search

Re: [wg14/wg21 liaison] #once proposal

From: Miguel Ojeda <miguel.ojeda.sandonis_at_[hidden]>
Date: Thu, 3 Feb 2022 21:30:31 +0100
On Thu, Feb 3, 2022 at 9:03 PM Ville Voutilainen
<ville.voutilainen_at_[hidden]> wrote:
> That's a rather bold claim to make, considering that there are

There is nothing bold about it, it is reality:


> union/bind mount scenarios where
> it doesn't work, or requires implementations to do full-content
> hashing to be able to say that two
> apparently different files have the same content. Such scenarios were
> explained with sufficient
> plausibility to WG21 in 2012 that a suggestion to standardize #once by
> that committee was dropped.
> Nothing in the current WG14 proposals even remotely suggests that
> solutions have been found
> to such problems.

This has nothing to do with what I claimed, so you are arguing with
the wind. The pitfalls with `#pragma once` are understood, and even
mentioned in the paper, and referenced too. You don't need to convince

> So no - it's not widely used everywhere, there are quite a few
> software houses where its use is completely banned,
> because it doesn't work.

"Widely used everywhere" does not mean *every single project*. It
simply means it is widely used in many domains / projects / companies.

This was in response to Steve who seemed to be on a quest to convince
everyone to avoid using it -- which will not happen, for better or


Received on 2022-02-03 20:30:43