MCPcopy Create free account
hub / github.com/ShiqiYu/CPP / Point

Class Point

week04/examples/enum.cpp:7–15  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5enum datatype {TYPE_INT8=1, TYPE_INT16=2, TYPE_INT32=4, TYPE_INT64=8};
6
7struct Point{
8 enum datatype type;
9 union {
10 std::int8_t data8[3];
11 std::int16_t data16[3];
12 std::int32_t data32[3];
13 std::int64_t data64[3];
14 };
15};
16
17size_t datawidth(struct Point pt)
18{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected