-
Notifications
You must be signed in to change notification settings - Fork 16
#pragma once instead of header guards #71
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Our project currently uses header guards. However, all the compilers we currently support (and wish to support) support the #pragma once directive and have done so for a long time.
The advantages of using #pragma once over traditional header guards are numerous:
- It's more readable
- It's faster to write
- There is no risk of header guard collision (two headers accidentally picking the same guard)
For this reason, I propose moving the project to using #pragma once instead of clunky #ifndef header guards.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request