CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/FWCore/Utilities/interface/GCC11Compatibility.h

Go to the documentation of this file.
00001 #ifndef FWCORE_GCC11COMPATIBILITY_H
00002 #define FWCORE_GCC11COMPATIBILITY_H
00003 /*
00004  * set of macro to control the level of comaptibility with c++11 standard
00005  * includes also other macro more specific to gcc
00006 
00007  */
00008 
00009 #include "FWCore/Utilities/interface/Visibility.h"
00010 #include "FWCore/Utilities/interface/Likely.h"
00011 
00012 
00013 #if defined(__GCCXML__) || defined(__CINT__)
00014   #define CMS_NOCXX11
00015 #endif
00016 #if !GCC_PREREQUISITE(4,6,0) && !defined(__clang__)
00017   #define CMS_NOCXX11
00018 #endif
00019 
00020 #ifndef CMS_NOCXX11
00021   #if GCC_PREREQUISITE(4,7,0)
00022      #define GCC11_FINAL final
00023      #define GCC11_OVERRIDE override
00024   #elif __clang__
00025      // FIXME: do not know how to query for final support. It's there in any
00026      //        clang version we will ever use, so it's fine.
00027      #define GCC11_FINAL final
00028      #if __has_feature(cxx_override_control)
00029       #define GCC11_OVERRIDE override
00030      #endif
00031   #else
00032      #define GCC11_FINAL
00033      #define GCC11_OVERRIDE
00034   #endif // gcc 4.7
00035 #else
00036   #define constexpr
00037   #define noexcept
00038   #define nullptr 0
00039   #define GCC11_FINAL
00040   #define GCC11_OVERRIDE
00041 #endif // NOCXX11
00042 
00043 #endif  // FWCORE_GCC11COMPATIBILITY_H