[Development] Using #pragma once
Thiago Macieira
thiago.macieira at intel.com
Mon Oct 8 19:06:37 CEST 2018
On Monday, 8 October 2018 09:12:26 PDT Matthew Woehlke wrote:
> On 08/10/2018 02.23, Henry Skoglund wrote:
> > So, what about a new preprocessor command:
> >
> > __has_same_md6_digest
>
> See also http://wg21.link/p0538 and note that EWG rejected it. The
> general consensus, AFAICT, is that modules is expected to make all this
> stuff irrelevant, and therefore EWG does not want to invest in fiddling
> with the preprocessor for a problem that is becoming irrelevant.
Comparing hashes has another problem: what happens if you have /usr/include/
QtCore/qglobal.h but it's slightly different (an older version)? In that case,
it could get included by #pragma once but wouldn't be for regular include
guards.
Again, this is a mistake in setting things up, but it happens often enough.
And the problem is one of figuring out what's wrong.
Not that it would stop *another* header from the older installation from
getting included, though.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Development
mailing list