 |
Pol
Revision:cb584c9
|
Go to the documentation of this file. 7 #ifndef CLIB_COMPILERSPECIFICS_H_ 8 #define CLIB_COMPILERSPECIFICS_H_ 12 #pragma warning( disable : 4467 ) // ATL attributes 13 #include <CodeAnalysis/sourceannotations.h> 14 #define passert_assume( x ) __analysis_assume( x ) 16 #define passert_assume( x ) 23 #if defined( _MSC_VER ) 24 #define POL_NORETURN _declspec( noreturn ) 25 #elif defined( __clang__ ) 26 #define POL_NORETURN [[noreturn]] 27 #elif defined( __GNUC__ ) 28 #define POL__GCC_VERSION ( __GNUC__ * 100 + __GNUC_MINOR__ ) 29 #if POL__GCC_VERSION <= 407 30 #define POL_NORETURN __attribute__( ( noreturn ) ) 32 #define POL_NORETURN [[noreturn]] 34 #undef POL__GCC_VERSION 36 #define POL_NORETURN [[noreturn]] 44 #ifndef POL_ANALYZER_NORETURN 46 #define __has_feature( x ) 0 48 #if __has_feature( attribute_analyzer_noreturn ) 49 #define POL_ANALYZER_NORETURN __attribute__( ( analyzer_noreturn ) ) 51 #define POL_ANALYZER_NORETURN 57 #if defined( _MSC_VER ) 58 #define POL_OVERRIDE override 59 #define POL_FINAL final 60 #elif defined( __clang__ ) 61 #define POL_OVERRIDE override 62 #define POL_FINAL final 63 #elif defined( __GNUC__ ) 64 #define POL__GCC_VERSION ( __GNUC__ * 100 + __GNUC_MINOR__ ) 65 #if POL__GCC_VERSION < 407 69 #define POL_OVERRIDE override 70 #define POL_FINAL final 72 #undef POL__GCC_VERSION 82 #if !defined( HAS_NOEXCEPT ) 83 #if defined( __clang__ ) 84 #if __has_feature( cxx_noexcept ) 88 #if defined( __GXX_EXPERIMENTAL_CXX0X__ ) && __GNUC__ * 10 + __GNUC_MINOR__ >= 46 || \ 89 defined( _MSC_FULL_VER ) && _MSC_FULL_VER >= 190023026 95 #define POL_NOEXCEPT noexcept 101 #if ( !defined( _MSC_VER ) || _MSC_VER >= 1900 ) 102 #define THREADLOCAL thread_local 104 #define THREADLOCAL __declspec( thread ) 107 #if ( !defined( _MSC_VER ) || _MSC_VER >= 1900 ) 108 #define CONSTEXPR constexpr