Pragma once
Directive in C and C++ provided as a language extension
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.
Nº Q307472 ★★
Uncommon · Literature
Pragma once
Directive in C and C++ provided as a language extension
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.
Last price
—
Floor price
—
7-day median
—
30-day sales
0
30-day range
—
In circulation
0
Price history
median
low – high
sales
No sales in this period
Show table
| Date | median | Low | High | sales |
|---|
Sales history
- Last sale
- —
- 30-day average
- —
- 30-day low
- —
- 30-day high
- —
- Sales 7d
- 0
- Sales 30d
- 0
No sales yet.
Anonymous sales: no buyer or seller shown. Figures count player-to-player sales only.
From Wikipedia
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 unit.
Text: Wikipédia, CC BY-SA 4.0. ·
Related cards
C preprocessor
Macro preprocessor used in the C, C++, and Objective-C programming languages
Nº Q856846 ★
Most vexing parse
Syntactic ambiguity in C++
Nº Q6916825 ★
Clang
Compiler front-end
Nº Q864915 ★★
C++
General-purpose programming language
Nº Q2407 ★★★★
Errno.h
C standard library header
Nº Q306452 ★★
C++11
2011 edition of the C++ programming language standard
Nº Q1061570 ★★