Skip to content

Commit

Permalink
Merge pull request #29124 from gartung/gartung-gcc11compatibility-cle…
Browse files Browse the repository at this point in the history
…anup-fwcore-utilities

FWCore packages: cleanup use of GCC11Compatibility.h
  • Loading branch information
cmsbuild authored Mar 19, 2020
2 parents 90d970e + e8500ad commit ff6d06e
Show file tree
Hide file tree
Showing 11 changed files with 3 additions and 50 deletions.
1 change: 0 additions & 1 deletion DataFormats/Common/interface/BasicHandle.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ If failedToGet() returns false but isValid() is also false then no attempt
#include "DataFormats/Provenance/interface/ProductID.h"
#include "DataFormats/Provenance/interface/Provenance.h"
#include "DataFormats/Common/interface/HandleExceptionFactory.h"
#include "FWCore/Utilities/interface/GCC11Compatibility.h"

#include <memory>

Expand Down
1 change: 0 additions & 1 deletion DataFormats/Common/interface/DetSet.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ own copy of the common DetId.
#include <cstdint>
#include <cstddef>
#include "DataFormats/Common/interface/CMS_CLASS_VERSION.h"
#include "FWCore/Utilities/interface/GCC11Compatibility.h"

namespace edm {
typedef uint32_t det_id_type;
Expand Down
1 change: 0 additions & 1 deletion DataFormats/Common/interface/Holder.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include "DataFormats/Common/interface/CMS_CLASS_VERSION.h"
#include "DataFormats/Common/interface/BaseHolder.h"
#include "DataFormats/Common/interface/RefHolder.h"
#include "FWCore/Utilities/interface/GCC11Compatibility.h"
#include <memory>

namespace edm {
Expand Down
1 change: 0 additions & 1 deletion DataFormats/Common/interface/MultiAssociation.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
#include <boost/range.hpp>
#include "DataFormats/Common/interface/CMS_CLASS_VERSION.h"
#include "DataFormats/Provenance/interface/ProductID.h"
#include "FWCore/Utilities/interface/GCC11Compatibility.h"

namespace edm {
namespace helper {
Expand Down
1 change: 0 additions & 1 deletion DataFormats/Common/interface/RefHolder_.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include "DataFormats/Common/interface/RefHolderBase.h"
#include "DataFormats/Provenance/interface/ProductID.h"
#include "FWCore/Utilities/interface/OffsetToBase.h"
#include "FWCore/Utilities/interface/GCC11Compatibility.h"
#include <memory>
#include <typeinfo>

Expand Down
2 changes: 0 additions & 2 deletions DataFormats/Common/interface/SortedCollection.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ unreliable if such duplicate entries are made.
#include "DataFormats/Provenance/interface/ProductID.h"
#include "FWCore/Utilities/interface/EDMException.h"

#include "FWCore/Utilities/interface/GCC11Compatibility.h"

#include <algorithm>
#include <typeinfo>
#include <vector>
Expand Down
1 change: 0 additions & 1 deletion DataFormats/Common/interface/VectorHolder.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include "DataFormats/Common/interface/BaseVectorHolder.h"
#include "DataFormats/Common/interface/Holder.h"
#include <memory>
#include "FWCore/Utilities/interface/GCC11Compatibility.h"

namespace edm {
namespace reftobase {
Expand Down
1 change: 0 additions & 1 deletion DataFormats/Common/interface/Wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Wrapper: A template wrapper around EDProducts to hold the product ID.
#include "DataFormats/Common/interface/WrapperDetail.h"
#include "DataFormats/Common/interface/CMS_CLASS_VERSION.h"
#include "DataFormats/Provenance/interface/ProductID.h"
#include "FWCore/Utilities/interface/GCC11Compatibility.h"
#include "FWCore/Utilities/interface/Visibility.h"

#include <algorithm>
Expand Down
1 change: 0 additions & 1 deletion FWCore/Framework/test/stubs/TestBeginEndJobAnalyzer.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

// system include files
#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "FWCore/Utilities/interface/GCC11Compatibility.h"
// user include files

// forward declarations
Expand Down
3 changes: 2 additions & 1 deletion FWCore/Utilities/interface/Exception.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@
#include <exception>
#include <type_traits>

#include "FWCore/Utilities/interface/GCC11Compatibility.h"
#include "FWCore/Utilities/interface/thread_safety_macros.h"
#include "FWCore/Utilities/interface/Likely.h"
#include "FWCore/Utilities/interface/Visibility.h"

namespace cms {

Expand Down
40 changes: 1 addition & 39 deletions FWCore/Utilities/interface/GCC11Compatibility.h
Original file line number Diff line number Diff line change
@@ -1,42 +1,4 @@
#ifndef FWCORE_GCC11COMPATIBILITY_H
#define FWCORE_GCC11COMPATIBILITY_H
/*
* set of macro to control the level of comaptibility with c++11 standard
* includes also other macro more specific to gcc
*/

#include "FWCore/Utilities/interface/Visibility.h"
#include "FWCore/Utilities/interface/Likely.h"

#if defined(__GCCXML__) || defined(__CINT__)
#define CMS_NOCXX11
#endif
#if !GCC_PREREQUISITE(4, 6, 0) && !defined(__clang__)
#define CMS_NOCXX11
#endif

#ifndef CMS_NOCXX11
#if GCC_PREREQUISITE(4, 7, 0)
#define GCC11_FINAL final
#define GCC11_OVERRIDE override
#elif __clang__
// FIXME: do not know how to query for final support. It's there in any
// clang version we will ever use, so it's fine.
#define GCC11_FINAL final
#if __has_feature(cxx_override_control)
#define GCC11_OVERRIDE override
#endif
#else
#define GCC11_FINAL
#define GCC11_OVERRIDE
#endif // gcc 4.7
#else
#define constexpr
#define noexcept
#define nullptr 0
#define GCC11_FINAL
#define GCC11_OVERRIDE
#endif // NOCXX11

#warning "GCC11Compatibility.h should be replaced with Visibility.h or Likely.h"
#endif // FWCORE_GCC11COMPATIBILITY_H

0 comments on commit ff6d06e

Please sign in to comment.