00001
00002
00021 #ifndef CXXUTILS_NORETURN_H
00022 #define CXXUTILS_NORETURN_H
00023
00024
00025
00026 #if __cplusplus > 201100
00027 # if defined(__GNUC__) && !(__GNUC__ > 4 || __GNUC_MINOR__ >= 8)
00028 # define ATH_HAS_NORETURN 0 // gcc < 4.8 --- not implemented
00029 # else
00030 # define ATH_HAS_NORETURN 1
00031 # endif
00032 #else
00033 # define ATH_HAS_NORETURN 0 // not c++11
00034 #endif
00035
00036
00037 #if ATH_HAS_NORETURN
00038 # define ATH_NORETURN(X) [[noreturn]] X
00039 #else
00040 # if defined(__GNUC__)
00041 # define ATH_NORETURN(X) X __attribute__ ((noreturn))
00042 # else
00043 # define ATH_NORETURN(X) X
00044 # endif
00045 #endif
00046
00047
00048 #endif // not CXXUTILS_NORETURN_H