chenjunfu2-nbt-cpp v2.1.0
一个基于CPP20的NBT(Named Binary Tag)库
载入中...
搜索中...
未找到
Compiler_Define.h
浏览该文件的文档.
1#pragma once
2
11
12
14
15//先预定义所有可能的编译器宏
16#define CJF2_NBT_CPP_COMPILER_MSVC 0
17#define CJF2_NBT_CPP_COMPILER_GCC 0
18#define CJF2_NBT_CPP_COMPILER_CLANG 0
19
20//后实际判断是哪个编译器,是就替换它自己的宏为1
21#if defined(_MSC_VER)
22 #undef CJF2_NBT_CPP_COMPILER_MSVC
23 #define CJF2_NBT_CPP_COMPILER_MSVC 1
24 #define CJF2_NBT_CPP_COMPILER_NAME "MSVC"
25#elif defined(__GNUC__)
26 #undef CJF2_NBT_CPP_COMPILER_GCC
27 #define CJF2_NBT_CPP_COMPILER_GCC 1
28 #define CJF2_NBT_CPP_COMPILER_NAME "GCC"
29#elif defined(__clang__)
30 #undef CJF2_NBT_CPP_COMPILER_CLANG
31 #define CJF2_NBT_CPP_COMPILER_CLANG 1
32 #define CJF2_NBT_CPP_COMPILER_NAME "Clang"
33#else
34 #define CJF2_NBT_CPP_COMPILER_NAME "Unknown"
35#endif
36