File: defs.h

package info (click to toggle)
libcds 2.3.3-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,632 kB
  • sloc: cpp: 135,002; ansic: 7,234; perl: 243; sh: 237; makefile: 6
file content (51 lines) | stat: -rw-r--r-- 1,324 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// Copyright (c) 2006-2018 Maxim Khizhinsky
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE or copy at http://www.boost.org/LICENSE_1_0.txt)

#ifndef CDSLIB_COMPILER_DEFS_H
#define CDSLIB_COMPILER_DEFS_H

// __cplusplus values
#define CDS_CPLUSPLUS_11     201103L
#define CDS_CPLUSPLUS_14     201402L
#define CDS_CPLUSPLUS_17     201703L

// VC 2017 is not full C++11-compatible yet
//#if __cplusplus < CDS_CPLUSPLUS_11
//#   error C++11 and above is required
//#endif


#if CDS_COMPILER == CDS_COMPILER_MSVC
#   include <cds/compiler/vc/defs.h>
#elif CDS_COMPILER == CDS_COMPILER_GCC
#   include <cds/compiler/gcc/defs.h>
#elif CDS_COMPILER == CDS_COMPILER_INTEL
#   include <cds/compiler/icl/defs.h>
#elif CDS_COMPILER == CDS_COMPILER_CLANG
#   include <cds/compiler/clang/defs.h>
#elif CDS_COMPILER == CDS_COMPILER_UNKNOWN
#   error Unknown compiler. Compilation aborted
#else
#   error Unknown value of CDS_COMPILER macro
#endif

#ifndef CDS_EXPORT_API
#   define CDS_EXPORT_API
#endif

#ifndef cds_likely
#   define cds_likely( expr )   expr
#   define cds_unlikely( expr ) expr
#endif

//if constexpr support (C++17)
#ifndef constexpr_if
#   define constexpr_if if
#endif

// Features
#include <cds/compiler/feature_tsan.h>

#endif  // #ifndef CDSLIB_COMPILER_DEFS_H