c++ - Is #error directive crossplatform and crosscompiler -


i know #error directive works @ least gcc , msvc

 #if !defined(__cplusplus)    #error c++ compiler required.    #endif 

but crossplatform , crosscompiler in general? part of standard maybe?

ps. because looking @ examples given in gcc , msvc manuals 1 sees differences. while works both quotes or not, makes sad feeling, might somehow compiler dependent.

gcc example

#error "won't work on ..."   // quotes here 

msvc example

#error c++ compiler required.    // no qutes 

yes is. it's standard preprocessor directive in c , c++.

references: http://en.cppreference.com/w/cpp/preprocessor/error http://en.cppreference.com/w/c/preprocessor/error


Comments

Popular posts from this blog

javascript - Create a stacked percentage column -

Optimising Firebase database by automatically overwriting data -

javascript - Angular UI-Grid customTemplate directive causing rows to load slowly/? -