C++ Keywords: __pragma


__pragma ( [ pragma [ argument-list ]] )

It is an error (C2760) if the first token after the __pragma is not a left parenthesis or if there is not a matching right parenthesis.


The __pragma keyword is for all practical purposes a compile-time equivalent of the preprocessor directive #pragma.

Documentation Status

For who can imagine what reason, the product documentation does not seem even to hint at the existence of this obviously useful keyword. Documentation of a sort is provided by the occasional use of the keyword in header files for the ATL and MFC libraries.