> -----Original Message-----
> From: Ville Voutilainen [mailto:[email protected]]
> Sent: Wednesday, 24 January 2018 11:25 AM
> To: Alexander Nassian <[email protected]>
> Cc: Mitch Curtis <[email protected]>; [email protected]
> Subject: Re: [Development] #pragma once
> 
> On 24 January 2018 at 12:22, Alexander Nassian <nassian@bitshift-
> dynamics.com> wrote:
> > Maybe because it’s not part of the C++ standard?
> 
> #pragma once is not a replacement for include guards.

Why not?

> It's not part of the C++ standard because it doesn't always work

In which ways? My quick search gave me these:

https://stackoverflow.com/a/1946730/904422
https://en.wikipedia.org/wiki/Pragma_once#Caveats

There's also this answer that highly recommends against it, but seems quite 
contended in the comments:

https://stackoverflow.com/a/34884735/904422

> and modules are a superior solution anyway.

How so?
_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to