Console Library
4.7.0
A header-only library that makes C++ simple
Loading...
Searching...
No Matches
info.h
Go to the documentation of this file.
1
8
9
/*
10
Copyright (c) 2026 MrXie1109
11
12
Permission is hereby granted, free of charge, to any person obtaining a copy
13
of this software and associated documentation files (the "Software"), to deal
14
in the Software without restriction, including without limitation the rights
15
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
copies of the Software, and to permit persons to whom the Software is
17
furnished to do so, subject to the following conditions:
18
19
The above copyright notice and this permission notice shall be included in all
20
copies or substantial portions of the Software.
21
22
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
SOFTWARE.
29
*/
30
31
#pragma once
32
#include <string>
33
34
namespace
console
35
{
40
inline
std::string
license
()
41
{
42
return
R
"(Copyright (c) 2026 MrXie1109
43
44
Permission is hereby granted, free of charge, to any person obtaining a copy
45
of this software and associated documentation files (the "Software"), to deal
46
in the Software without restriction, including without limitation the rights
47
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
48
copies of the Software, and to permit persons to whom the Software is
49
furnished to do so, subject to the following conditions:
50
51
The above copyright notice and this permission notice shall be included in all
52
copies or substantial portions of the Software.
53
54
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
55
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
56
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
57
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
58
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
59
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
60
SOFTWARE.)";
61
}
62
68
inline
std::string
platform
()
69
{
70
#ifdef _WIN32
71
return
"Windows"
;
72
#elif defined(__linux__)
73
return
"Linux"
;
74
#elif defined(__APPLE__)
75
return
"macOS"
;
76
#else
77
return
"Unknown"
;
78
#endif
79
}
80
83
86
inline
std::string
compiler
()
87
{
88
#ifdef __GNUC__
89
return
"GCC "
+
90
std::to_string(__GNUC__) +
91
"."
+
92
std::to_string(__GNUC_MINOR__);
93
#elif defined(_MSC_VER)
94
return
"MSVC "
+ std::to_string(_MSC_VER);
95
#elif defined(__clang__)
96
return
"Clang"
;
97
#else
98
return
"Unknown"
;
99
#endif
100
}
101
106
inline
std::string
version
()
107
{
108
return
"console version 4.7.0 (2026-05-04) -- \"Better Random.\""
;
109
}
110
115
inline
std::string
author
()
116
{
117
return
"MrXie1109"
;
118
}
119
}
console
本库所有组件所在的顶层命名空间。
console::license
std::string license()
返回 MIT 许可证全文。
Definition
info.h:40
console::author
std::string author()
返回库的作者。
Definition
info.h:97
console::version
std::string version()
返回库的版本字符串。
Definition
info.h:88
console::platform
std::string platform()
返回当前操作系统平台名称。
Definition
info.h:50
console::compiler
std::string compiler()
返回当前使用的编译器名称和版本。
Definition
info.h:68
console
info.h
Generated on
for Console Library by
1.16.1