-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_func.cpp
More file actions
29 lines (27 loc) · 797 Bytes
/
test_func.cpp
File metadata and controls
29 lines (27 loc) · 797 Bytes
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
#include "em_fmt.hpp"
// #include <vector>
#include <cstdint>
int main() {
em::fprint<"int={}, long={}, double={}, float={}, char={}, cstr={}, str={}, strv={}, bool={}, ptr={}, nullptr={}, "
" uint64={}, int8={}, uint16={}, size_t={}, hex={}, sci={}\n">(
stdout,
42,
1234567890L,
3.1415926,
2.71828f,
'A',
"C-string",
std::string("std::string"),
std::string_view("std::string_view"),
true,
(void *)0x1234ABCD,
nullptr,
// std::vector<int>{ 1, 2, 3, 4 },//暂未支持
static_cast<uint64_t>(9876543210ULL),
static_cast<int8_t>(-5),
static_cast<uint16_t>(65535),
static_cast<size_t>(123456),
0xBEEF,
0.00123);
return 0;
}