Skip to content

Use pragma once instead of include guards#15

Open
SunBlack wants to merge 1 commit intockgt:masterfrom
SunBlack:use_pragma_once
Open

Use pragma once instead of include guards#15
SunBlack wants to merge 1 commit intockgt:masterfrom
SunBlack:use_pragma_once

Conversation

@SunBlack
Copy link
Copy Markdown

The use of #pragma once can reduce build times as the compiler will not open and read the file after the first #include of the file in the translation unit.

See here. As it is supported by all modern compilers since years (see here), I don't see any real argument against it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant