Files
cbindgen/tests/expectations/constant.cpp
T
Kartikaya Gupta 5f6b223237 Add ostream header to all generated .cpp files.
Ideally we'd just do this when we need it, but the ostream derivation
will be controlled by both global config and per-structure config, so
it's hard to know exactly when we need it and when we don't.
2020-10-01 12:22:51 +02:00

55 lines
940 B
C++

#include <cstdarg>
#include <cstdint>
#include <cstdlib>
#include <ostream>
#include <new>
static const uint8_t CAST = (uint8_t)'A';
static const uint32_t DELIMITER = ':';
static const uint32_t DOUBLE_CAST = (uint32_t)(float)1;
static const uint32_t EQUID = L'\U00010083';
static const int32_t FOO = 10;
static const uint32_t HEART = L'\U00002764';
static const uint32_t LEFTCURLY = '{';
/// A
/// multi-line
/// doc
/// comment.
static const int8_t NEG_ONE = -1;
static const uint32_t NEWLINE = '\n';
/// A single-line doc comment.
static const int8_t POS_ONE = 1;
static const uint32_t QUOTE = '\'';
static const int64_t SHIFT = 3;
static const uint32_t TAB = '\t';
static const int64_t XBOOL = 1;
static const int64_t XFALSE = ((0 << SHIFT) | XBOOL);
static const int64_t XTRUE = (1 << (SHIFT | XBOOL));
static const float ZOM = 3.14;
struct Foo {
int32_t x[FOO];
};
extern "C" {
void root(Foo x);
} // extern "C"