-
Notifications
You must be signed in to change notification settings - Fork 16
/
test2.cpp
54 lines (44 loc) · 966 Bytes
/
test2.cpp
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
44
45
46
47
48
49
50
51
52
53
54
#include "print.h"
struct MyStruct {
} my_struct;
namespace foo {
class Bar {
};
}
int main() {
const char *str = "hello";
print str;
{
long long i = 42;
print i;
}
{
unsigned long long i = 42;
print i;
}
#if defined(__GXX_EXPERIMENTAL_CXX0X__)
{
char32_t a = 'x';
char16_t b = 'y';
print a, b;
}
#endif
print (__int128) 1;
print (unsigned __int128) 1;
print (wchar_t) 'x', (wchar_t) 233;
print (long double) 2.3;
int numbers[] = {1, 2, 3};
print "a", &my_struct;
print numbers;
foo::Bar bar;
pretty::Print(stdout) * "p =", &bar;
bool b = true;
print b;
char letters[] = { 'a', 'b', 'c', 'd' };
print "1", "2", "3", letters;
print letters;
print letters, letters;
print "hello", "one";
const char letters2[] = { 'x', 'y', 'z' };
print letters2;
}