CMS 3D CMS Logo

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 #if defined(__GCCXML__) || defined(__CINT__)
13 #define CMS_NOCXX11
14 #endif
15 #if !GCC_PREREQUISITE(4, 6, 0) && !defined(__clang__)
16 #define CMS_NOCXX11
17 #endif
18 
19 #ifndef CMS_NOCXX11
20 #if GCC_PREREQUISITE(4, 7, 0)
21 #define GCC11_FINAL final
22 #define GCC11_OVERRIDE override
23 #elif __clang__
24 // FIXME: do not know how to query for final support. It's there in any
25 // clang version we will ever use, so it's fine.
26 #define GCC11_FINAL final
27 #if __has_feature(cxx_override_control)
28 #define GCC11_OVERRIDE override
29 #endif
30 #else
31 #define GCC11_FINAL
32 #define GCC11_OVERRIDE
33 #endif // gcc 4.7
34 #else
35 #define constexpr
36 #define noexcept
37 #define nullptr 0
38 #define GCC11_FINAL
39 #define GCC11_OVERRIDE
40 #endif // NOCXX11
41 
42 #endif // FWCORE_GCC11COMPATIBILITY_H