Debian Codegraph @

.cargo/vendor/cbindgen/tests/expectations/constant.cpp

raw
1 #include <cstdarg>
2 #include <cstdint>
3 #include <cstdlib>
4 #include <ostream>
5 #include <new>
6
7 constexpr static const int32_t FOO = 10;
8
9 constexpr static const uint32_t DELIMITER = ':';
10
11 constexpr static const uint32_t LEFTCURLY = '{';
12
13 constexpr static const uint32_t QUOTE = '\'';
14
15 constexpr static const uint32_t TAB = '\t';
16
17 constexpr static const uint32_t NEWLINE = '\n';
18
19 constexpr static const uint32_t HEART = U'\U00002764';
20
21 constexpr static const uint32_t EQUID = U'\U00010083';
22
23 constexpr static const float ZOM = 3.14;
24
25 /// A single-line doc comment.
26 constexpr static const int8_t POS_ONE = 1;
27
28 /// A
29 /// multi-line
30 /// doc
31 /// comment.
32 constexpr static const int8_t NEG_ONE = -1;
33
34 constexpr static const int64_t SHIFT = 3;
35
36 constexpr static const int64_t XBOOL = 1;
37
38 constexpr static const int64_t XFALSE = ((0 << SHIFT) | XBOOL);
39
40 constexpr static const int64_t XTRUE = (1 << (SHIFT | XBOOL));
41
42 constexpr static const uint8_t CAST = (uint8_t)'A';
43
44 constexpr static const uint32_t DOUBLE_CAST = (uint32_t)(float)1;
45
46 struct Foo {
47 int32_t x[FOO];
48 };
49
50 extern "C" {
51
52 void root(Foo x);
53
54 } // extern "C"