GO-Ve01
ServicesDevelopersBooksDictionaryPapersWikidataEncyclopediaSearchBabelCareersDeck

#pragma once

In the C and C++ programming languages, #pragma once is a non-standard but widely supported preprocessor directive designed to cause the current header file to be included only once in a single compilation. Thus, #pragma once serves the same purpose as #include guards, but with several advantages, including less code, avoidance of name clashes, and sometimes improvement in compilation speed. While #pragma once is available in most modern compilers, its implementation is tricky and might not always be reliable. Modules, introduced in C++20, eliminates the necessity of #pragma once , due to not being handled by the preprocessor. Modules can only be imported at most one time into a translation... Source: e01 Encyclopedia. Licence: CC BY-SA 4.0.

References

  1. #pragma once. https://en.wikipedia.org/w/index.php?oldid=1375994497 · 1795438144.7002156
source: e01 Encyclopedia · licence: CC BY-SA 4.0 · page · source revision

Cite this

"#pragma once". 1789977093. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1375994497

JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy

Save to pass ·