pragma in c++
Why to use #pragma once in program?
'#pragma' is a Preprocessor directive, which specifies how a compiler should process its input.
The use of #pragma once can reduce build times. Compiler will not open and read the file again after the first #include of the file in the translation unit. It's called the multiple-include optimization.
The intrinsic pragma tells the compiler that a function has known behavior. The compiler may call the function and not replace the function call with inline instructions, if it will result in better performance.
Comments
Post a Comment