CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GCC11Compatibility.h
Go to the documentation of this file.
1 #ifndef FWCORE_GCC11COMPATIBILITY_H
2 #define FWCORE_GCC11COMPATIBILITY_H
3 /*
4  * set of macro to control the level of comaptibility with c++11 standard
5  * includes also other macro more specific to gcc
6 
7  */
8 
11 
12 
13 #if defined(__GCCXML__) || defined(__CINT__)
14  #define CMS_NOCXX11
15 #endif
16 #if !GCC_PREREQUISITE(4,6,0) && !defined(__clang__)
17  #define CMS_NOCXX11
18 #endif
19 
20 #ifndef CMS_NOCXX11
21  #if GCC_PREREQUISITE(4,7,0)
22  #define GCC11_FINAL final
23  #define GCC11_OVERRIDE override
24  #elif __clang__
25  // FIXME: do not know how to query for final support. It's there in any
26  // clang version we will ever use, so it's fine.
27  #define GCC11_FINAL final
28  #if __has_feature(cxx_override_control)
29  #define GCC11_OVERRIDE override
30  #endif
31  #else
32  #define GCC11_FINAL
33  #define GCC11_OVERRIDE
34  #endif // gcc 4.7
35 #else
36  #define constexpr
37  #define noexcept
38  #define nullptr 0
39  #define GCC11_FINAL
40  #define GCC11_OVERRIDE
41 #endif // NOCXX11
42 
43 #endif // FWCORE_GCC11COMPATIBILITY_H