Files
geant4/source/externals/clhep/include/CLHEP/Utility/atomic_int.h
T
2018-06-29 10:58:11 +02:00

24 lines
582 B
C++

#ifndef CLHEP_ATOMIC_INT_H
#define CLHEP_ATOMIC_INT_H
// ======================================================================
//
// Use std::atomic when the compiler declares it uses the C++11 standard
//
// ======================================================================
#if defined (G4MULTITHREADED)
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 7) || __clang__ || WIN32
#include <atomic>
#define CLHEP_ATOMIC_INT_TYPE std::atomic<int>
#else
#define CLHEP_ATOMIC_INT_TYPE int
#endif
#else
#define CLHEP_ATOMIC_INT_TYPE int
#endif
#endif