You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1 if there is a corresponding compiler, otherwise 0.
10
-
The 'xxx' here refers to the compiler name, and details can be found in the 'src/compilers.h' source code.
11
-
12
-
**Note: An environment may contain multiple compiler environments.**
13
-
#### Usage
14
-
```c
15
-
#include<cppp/cppp-platform.h>
16
-
#if __has_msvc_compiler__
17
-
#error "This project do not support MSVC!"
18
-
#endif
19
-
intmain(){}
20
-
```
21
-
#### We provide preset compiler macros
10
+
11
+
#### Type of \_\_has_xxx_compiler\_\_
12
+
13
+
macro
14
+
15
+
#### Description of \_\_has_xxx_compiler\_\_
16
+
17
+
`1` if there is a corresponding compiler, otherwise `0`.
18
+
19
+
The 'xxx' here refers to the compiler name, and details can be found in the `src/compilers.h` source code.
20
+
21
+
**Note: An environment may contain multiple compiler environments, so multiple compiler macros may be defined at the same time. e.g. `__has_gcc_compiler__`, `__has_clang_compiler__`.**
If there is a corresponding OS environment, it is 1, otherwise it is 0.
10
-
The 'xxx' here refers to the OS name, and details can be found in the 'src/platforms.h' source code.
11
-
12
-
**Note: An compile environment may contain multiple environments**
13
-
#### Usage
14
-
```c
15
-
#include<cppp/cppp-platform.h>
16
-
#if __has_windows__
17
-
#error "We do not support Windows!"
18
-
#endif
19
-
intmain(){}
20
-
```
8
+
9
+
### \_\_has_xxx\_\_
10
+
11
+
#### Type of \_\_has_xxx\_\_
12
+
13
+
macro
14
+
15
+
#### Description of \_\_has_xxx\_\_
16
+
17
+
If there is a corresponding OS environment, it is `1`, otherwise it is `0`.
18
+
19
+
The 'xxx' here refers to the OS name, and details can be found in the `src/platforms.h` source code.
20
+
21
+
**Note: An compile environment may contain multiple environments at the same time. e.g. Cygwin Environment is a Unix-like environment, but it is also a Windows environment.**
22
+
21
23
#### We provide preset compiler macros
24
+
22
25
| Platform | Macro |
23
26
| :----: | :----: |
24
27
| AIX |\_\_has_aix\_\_|
@@ -51,7 +54,7 @@ int main(){}
51
54
| MinGW |\_\_has_mingw\_\_|
52
55
| MorphOS |\_\_has_morph_os\_\_|
53
56
| MPE/iX |\_\_has_mpe_ix\_\_|
54
-
| MSDOS (C++ Plus C unsupport platform) |\_\_has_dos\_\_|
0 commit comments