4.2.6.15
__has_include [V2.08 or later]
__has_include ("file-name")
__has_include (<file-name>)
|
Evaluates as 1 if the file specified by file-name for __has_include exists during preprocessing, and evaluates as 0 if the file does not exist.
If __has_include is evaluated as a macro, the value is set to 1.
__has_include can only be used in a preprocess directive such as #if. If it is used for anything else, an error occurs.
#if defined(__has_include)
#if __has_include("existent_usr_header1.h")
#include "existent_usr_header1.h";
#endif
#if __has_include(<existent_usr_header1.h>)
#include <existent_usr_header1.h>;
#endif
#endif
|
The following description will cause an error.
int exists = __has_include("existent_usr_header1.h");
|