136 #pragma warning( disable : 4514 ) // unreferenced inline function has been removed 137 #pragma warning( disable : 4244 ) // possible loss of data 138 #pragma warning( disable : 4512 ) // assignment operator could not be generated 139 #pragma warning( disable : 4201 ) // nonstandard extension used : nameless struct/union (needed in windows.h) 140 #pragma warning( disable : 4511 ) // copy constructor could not be generated 141 #pragma warning( disable : 4291 ) // no matching operator delete found; memory will not be freed if initialization thows an exception 142 #pragma warning( disable : 4351 ) // new behavior: elements of array ... will be default initialized 143 #ifdef CHECK_UNHANDLED_OOPS 144 #pragma warning( disable : 4521 ) // class has multiple copy ctors of a single type 145 #pragma warning( disable : 4522 ) // class has multiple assignment operators of a single type 146 #endif // CHECK_UNHANDLED_OOPS 147 #if _MSC_VER >= 1400 148 #pragma warning( disable : 4996 ) // unsafe string functions. Same as define _CRT_SECURE_NO_WARNINGS/_CRT_SECURE_NO_DEPRICATE 149 #endif 150 151 // Formatting. 152 #define FORMAT64_MODIFIER "I64" 153 154 #define offset_of(klass,field) offsetof(klass,field) 155 156 #ifndef USE_LIBRARY_BASED_TLS_ONLY 157 #define THREAD_LOCAL_DECL __declspec( thread ) 158 #endif 159 160 // Inlining support 161 // MSVC has '__declspec(noinline)' but according to the official documentation 162 // it only applies to member functions. There are reports though which pretend 163 // that it also works for freestanding functions. 164 #define NOINLINE __declspec(noinline) 165 #define ALWAYSINLINE __forceinline 166 167 // Alignment 168 #define ATTRIBUTE_ALIGNED(x) __declspec(align(x)) 169 170 #endif // SHARE_UTILITIES_GLOBALDEFINITIONS_VISCPP_HPP | 136 #pragma warning( disable : 4514 ) // unreferenced inline function has been removed 137 #pragma warning( disable : 4244 ) // possible loss of data 138 #pragma warning( disable : 4512 ) // assignment operator could not be generated 139 #pragma warning( disable : 4201 ) // nonstandard extension used : nameless struct/union (needed in windows.h) 140 #pragma warning( disable : 4511 ) // copy constructor could not be generated 141 #pragma warning( disable : 4291 ) // no matching operator delete found; memory will not be freed if initialization thows an exception 142 #pragma warning( disable : 4351 ) // new behavior: elements of array ... will be default initialized 143 #ifdef CHECK_UNHANDLED_OOPS 144 #pragma warning( disable : 4521 ) // class has multiple copy ctors of a single type 145 #pragma warning( disable : 4522 ) // class has multiple assignment operators of a single type 146 #endif // CHECK_UNHANDLED_OOPS 147 #if _MSC_VER >= 1400 148 #pragma warning( disable : 4996 ) // unsafe string functions. Same as define _CRT_SECURE_NO_WARNINGS/_CRT_SECURE_NO_DEPRICATE 149 #endif 150 151 // Formatting. 152 #define FORMAT64_MODIFIER "I64" 153 154 #define offset_of(klass,field) offsetof(klass,field) 155 156 #if _MSC_VER < 1900 157 #define thread_local __declspec(thread) 158 #endif 159 160 // Inlining support 161 // MSVC has '__declspec(noinline)' but according to the official documentation 162 // it only applies to member functions. There are reports though which pretend 163 // that it also works for freestanding functions. 164 #define NOINLINE __declspec(noinline) 165 #define ALWAYSINLINE __forceinline 166 167 // Alignment 168 #define ATTRIBUTE_ALIGNED(x) __declspec(align(x)) 169 170 #endif // SHARE_UTILITIES_GLOBALDEFINITIONS_VISCPP_HPP |