C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Revising #pragma once

From: Thiago Macieira <thiago_at_[hidden]>
Date: Thu, 29 Aug 2024 16:16:15 -0700
On Thursday 29 August 2024 16:05:26 GMT-7 Jeremy Rifkin via Std-Proposals
wrote:
> > It's high time this proposal is nuked, yet again. I'll happily do that
> > in the committee if need be, but I'd prefer not wasting time on it
> > there.
>
> People are using #pragma once, standard or not. Standardizing it would
> give people clearer expectations about when it is and is not ok to
> use.

And what are those expectations?

I'll give one: don't use if someone else will compile your code.

Add a note to the bottom of the page: "someone else" may be "future you".

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

Received on 2024-08-29 23:16:16