RFC: plan for starting the Qt5/KF5 port
Cyrille Berger
cberger at cberger.net
Wed Feb 25 07:53:58 GMT 2015
On Wednesday 25 February 2015 01:01:57 Friedrich W. H. Kossebau wrote:
> Am Dienstag, 24. Februar 2015, 09:47:41 schrieb Boudewijn Rempt:
> > As a sidenote, I also want to take the opportunity to do a clean-up step,
> > but I'm not sure what the right moment or place is. It might even
> > something to do in the 2.9 branch after tagging...
> >
> > * replace all header guards with '#pragma once' -- because errors with
> > header guards are actually quite frequent, and all compilers support this
> > pragma now.
>
> Hm, I have not seen this done elsewhere yet, can we be sure that all
> compilers we are targetting (which I assume would be defined what Qt5/KF5
> targets for now) support this? And given you also target the 2.9 branch,
> which might mean another set of compilers again. CentOS4(?)'s compiler
> supports it? (Pardon, just stresstesting things I note down)
Pretty much all compilers support #pragma once, it was considered to be part
of the c++ standard. (it is in gcc since 3.4, so I suspect that it is ok for
CentOS4).
The reason that it was not added to the standard (yet) is because none of the
implementation or full-proof, detecting if it is the same file is apparently
hard (something to do with symlink/hardlink), there are some problems with
some network file systems and it can happen that the same header file is copied
in multiple places.
Personally, I think that "#pragma once" not being standard is a good reason
for not using it.
--
Cyrille Berger Skott
More information about the calligra-devel
mailing list