CLHEP
2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
atomic_int.h
Go to the documentation of this file.
1
#ifndef CLHEP_ATOMIC_INT_H
2
#define CLHEP_ATOMIC_INT_H
3
4
// ======================================================================
5
//
6
// Use std::atomic when the compiler declares it uses the C++11 standard
7
//
8
// on macOS, atomic is available starting with Sierra (Darwin 16)
9
// ======================================================================
10
11
#if _WIN32
12
#include <atomic>
13
#define CLHEP_ATOMIC_INT_TYPE std::atomic<int>
14
#else
15
#if __cplusplus >= 201103L
16
17
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 7) || __clang__
18
#include <atomic>
19
#define CLHEP_ATOMIC_INT_TYPE std::atomic<int>
20
#else
21
#define CLHEP_ATOMIC_INT_TYPE int
22
#endif
23
24
#else
25
#define CLHEP_ATOMIC_INT_TYPE int
26
#endif
27
#endif
28
29
#endif
CLHEP-CLHEP_2_4_6_4
Utility
Utility
atomic_int.h
Generated by
1.9.6