[Development] #pragma once
Ville Voutilainen
ville.voutilainen at gmail.com
Wed Jan 24 13:26:26 CET 2018
On 24 January 2018 at 14:24, Ville Voutilainen
<ville.voutilainen at gmail.com> wrote:
> On 24 January 2018 at 14:19, Mitch Curtis <mitch.curtis at qt.io> wrote:
>>> > https://en.wikipedia.org/wiki/Pragma_once#Caveats
>>>
>>> That wikipedia link seems to describe the problems fairly accurately.
>>
>> Do we have that issue in Qt?
>
> I do not anticipate to like to debug it if we hit that issue in our
> CI, or in a customer use case, or other user use case.
> If you want to insist on using #pragma once, the sane way forward is
> to use it in conjunction with header guards, not
> instead of header guards.
That, of course, means that #pragma once will not solve your original
problem, because in order
to avoid the problems of #pragma once, it needs to be inside the header guard.
More information about the Development
mailing list