Besides its possible flaws, it‘s simply nothing that the C++ standard defines. I also want to use some glibc features that maybe also commonly available but it is still not standard, even worse, the implementation is completely userdefined. That same discussion raises up once a year about STL containers and others and then some compiler proves that Qt‘s way is the better by introducing some kind of bug or binary incompatibility.
Beste Grüße / Best regards, Alexander Nassian > Am 24.01.2018 um 12:32 schrieb Jean-Michaël Celerier > <[email protected]>: > > I certainly have been bitten much more times by include guards that were the > same in different files (especially in old libraries where guards look like > #ifdef QUEUE_H because of course there is a single queue.h file in the whole > world, or because someone just copy-pasted the content of a file to another > and forgot changing include guards -- I plead guilty!) than whatever > hypothetic bug in pragma once GCC's implementation may have. > > Are there people here who had, just once, a bug due to #pragma once ? I never > met any. Across network drives, with precompiled headers, unity builds, with > MSVC, Clang, GCC, ccache, distcc and Icecream... > > > > ------- > Jean-Michaël Celerier > http://www.jcelerier.name > >> On Wed, Jan 24, 2018 at 11:34 AM, Mitch Curtis <[email protected]> wrote: >> >> >> > -----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 > -- — bitshift dynamics GmbH Neudorfer Str. 1, 79541 Lörrach Registergericht: Amtsgericht Freiburg i. Breisgau, HRB 713747 Geschäftsführer: Alexander Nassian, Markus Pfaffinger http://www.bitshift-dynamics.de Zentrale: +49 762158673 - 0 Fax: +49 7621 58673 - 90 Allgemeine Anfragen: [email protected] Technischer Support: [email protected] Buchhaltung: [email protected]
_______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
