pragma(msg) and pragma(lib)
Pragmas are a way of interacting with the compiler. They can be used for providing special information to the compiler as well as getting information from it. Although they are useful in non-templated code,
pragma(msg) can be helpful when debugging templates.
Every compiler vendor is free to introduce their special pragma directives in addition to the mandatory ones, which will be covered in this chapter.
pragma(msg) prints a message to
stderr during compilation. No message is printed during the execution of the compiled program.
For example, the following
pragma(msg) is being used for exposing the types of template parameters, presumably during debugging: