4
4
//
5
5
// Documentation for the SDK is found at https://antithesis.com/docs/using_antithesis/sdk/cpp/overview/.
6
6
7
+ #ifndef NO_ANTITHESIS_SDK
8
+
7
9
#if __cplusplus < 202000L
8
10
#error "The Antithesis C++ API requires C++20 or higher"
9
11
#ifndef NO_ANTITHESIS_SDK
10
12
#define NO_ANTITHESIS_SDK
11
13
#endif
12
14
#endif
13
15
14
- #if defined(__clang__) && __clang_major__ < 16
15
- #error "The Antithesis C++ API requires clang version 16 or higher"
16
+ #if !defined(__clang__)
17
+ #error "The Antithesis C++ API requires a clang compiler"
18
+ #ifndef NO_ANTITHESIS_SDK
19
+ #define NO_ANTITHESIS_SDK
20
+ #endif
21
+ #endif
16
22
23
+ #if __clang_major__ < 16
24
+ #error "The Antithesis C++ API requires clang version 16 or higher"
17
25
#ifndef NO_ANTITHESIS_SDK
18
26
#define NO_ANTITHESIS_SDK
19
27
#endif
20
28
#endif
21
29
30
+ #else
31
+
32
+ #if __cplusplus < 201700L
33
+ #error "The Antithesis C++ API (with NO_ANTITHESIS_SDK) requires C++17 or higher"
34
+ #endif
22
35
36
+ #endif
23
37
24
38
/* ****************************************************************************
25
39
* COMMON
@@ -43,7 +57,7 @@ namespace antithesis {
43
57
struct JSONArray : std::vector<JSONValue> {
44
58
using std::vector<JSONValue>::vector;
45
59
46
- template <typename T, std::enable_if<std::is_convertible<T, JSONValue>::value, bool >::type = true >
60
+ template <typename T, typename std::enable_if<std::is_convertible<T, JSONValue>::value, bool >::type = true >
47
61
JSONArray (std::vector<T> vals) : std::vector<JSONValue>(vals.begin(), vals.end()) {}
48
62
};
49
63
0 commit comments