rakhimov / scram

Probabilistic Risk Analysis Tool (fault tree analysis, event tree analysis, etc.)
https://scram-pra.org
GNU General Public License v3.0
131 stars 54 forks source link

Replace header guards w/ '#pragma once' #253

Closed rakhimov closed 6 years ago

rakhimov commented 6 years ago

#pragma once is non-standard but a widely available compiler extension. There are some corner cases w/ symbolic & hard links, and duplicated source files. This extension is not recommended by Cpp core guidelines and Google style. Being a compiler-specific extension, '#pragma once' may have surprises though highly unlikely.

Even with all the downsides, the benefits of '#pragma once' far outweigh the risks (as applied to SCRAM).