Debian Codegraph @

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

raw
1 #include <cstdarg>
2 #include <cstdint>
3 #include <cstdlib>
4 #include <ostream>
5 #include <new>
6
7 constexpr static const uint16_t FONT_WEIGHT_FRACTION_BITS = 6;
8
9 template<uint16_t FRACTION_BITS>
10 struct FixedPoint {
11 uint16_t value;
12 };
13
14 using FontWeightFixedPoint = FixedPoint<FONT_WEIGHT_FRACTION_BITS>;
15
16 struct FontWeight {
17 FontWeightFixedPoint _0;
18 };
19 constexpr static const FontWeight FontWeight_NORMAL = FontWeight{ /* ._0 = */ FontWeightFixedPoint{ /* .value = */ (400 << FONT_WEIGHT_FRACTION_BITS) } };
20
21 extern "C" {
22
23 void root(FontWeight w);
24
25 } // extern "C"