-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUtils.cpp
More file actions
43 lines (36 loc) · 702 Bytes
/
Utils.cpp
File metadata and controls
43 lines (36 loc) · 702 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include "Utils.hpp"
template<>
void print<uint8_t>(uint8_t v) {
printf(std::to_string(v).c_str());
printf("\n");
}
template<>
void print<uint16_t>(uint16_t v) {
printf(std::to_string(v).c_str());
printf("\n");
}
template<>
void print<uint32_t>(uint32_t v) {
printf(std::to_string(v).c_str());
printf("\n");
}
template<>
void print<uint64_t>(uint64_t v) {
printf(std::to_string(v).c_str());
printf("\n");
}
template<>
void print<const char*>(const char* v) {
printf(v);
printf("\n");
}
template<>
void print<char*>(char* v) {
printf(v);
printf("\n");
}
template<>
void print<std::string>(std::string v) {
printf(v.c_str());
printf("\n");
}