[geos-devel] pragma once

Heiskanen Mika (FMI) Mika.Heiskanen at fmi.fi
Wed Dec 19 08:13:15 PST 2018

From: geos-devel <geos-devel-bounces at lists.osgeo.org> on behalf of Greg Troxel <gdt at lexort.com>

> Paul Ramsey <pramsey at cleverelephant.ca> writes:
> > As I fart around w/ header guards every time I add a new header/class,
> > I wonder if changing over to #pragma once would be OK with one and
> > all? GCC has had it 3.4, and clang has always had it, so…?
> Is that covered by any standards?
> (Presumably there is some other compiler people use on windows, too.)

No, it is not part of any standard. Compiler support is quite extensive though,
see for example https://en.wikipedia.org/wiki/Pragma_once

Mika Heiskanen

More information about the geos-devel mailing list