MCPcopy Create free account
hub / github.com/boostorg/pfr / parseLinePrefix

Function parseLinePrefix

test/core/run/destructuring_tie.cpp:29–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27}
28
29auto parseLinePrefix(char const* line) {
30 struct {
31 size_t byteCount, address, recordType; char const* rest;
32 } res;
33 using namespace boost::pfr;
34 tie_from_structure (res.byteCount, line) = parseHex(line, 2);
35 tie_from_structure (res.address, line) = parseHex(line, 4);
36 tie_from_structure (res.recordType, line) = parseHex(line, 2);
37 res.rest = line;
38 return res;
39}
40
41int main() {
42 auto line = "0860E000616263646566000063";

Callers 1

mainFunction · 0.85

Calls 2

tie_from_structureFunction · 0.85
parseHexFunction · 0.85

Tested by

no test coverage detected