[geos-devel] pragma once

Howard Butler howard at hobu.co
Wed Dec 19 11:27:19 PST 2018

On 12/19/18 11:26 AM, Greg Troxel wrote:
> Paul Ramsey <pramsey at cleverelephant.ca> writes:
>> "non standard but widely supported"
>> https://en.wikipedia.org/wiki/Pragma_once
>> Includes MSVC! :)
> As much as I hate to depart from standards, that does look near
> universal.

Go for #pragma once. We haven't regretted it in PDAL for the nearly
eight years we've existed. It cleans up tons of #ifdef churn and culls a
set of difficult-to-debug situations (same ifdef being used from
copypasta code). 

You have probably clipped off every compiler that doesn't support
#pragma once with the C++11 requirement anyway...


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 528 bytes
Desc: OpenPGP digital signature
URL: <http://lists.osgeo.org/pipermail/geos-devel/attachments/20181219/1c2a2fd0/attachment.sig>

More information about the geos-devel mailing list