C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Revising #pragma once

From: Thiago Macieira <thiago_at_[hidden]>
Date: Thu, 29 Aug 2024 21:43:16 -0700
On Thursday 29 August 2024 19:49:17 GMT-7 Jeremy Rifkin wrote:
> Well, the failure mode of a filesystem-based definition in this case
> is a header being duplicated across multiple mounts, with different
> #includes resolving to paths on different mounts, resulting in them
> being #included multiple times. Depending on how the FUSE mounts are
> set up, maybe this sort of header duplication can be avoided.
> Alternatively, e.g. in the case of libraries, a qualified include
> guard should probably be preferred. Alternatively, maybe this is a
> tooling problem and generating forwarding headers as Gašper mentioned
> is the right solution.

Anything that shifts the problem to the user or the IT admin is unacceptable
as a solution. So all I'm taking from here is "it should be avoided for
libraries".

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Principal Engineer - Intel DCAI Platform & System Engineering

Received on 2024-08-30 04:43:21