MCPcopy Create free account
hub / github.com/andreasfertig/programming-with-cpp20 / main

Function main

12.08-byteSwap1/main.cpp:57–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55static_assert(ByteSwap(uint8_t(0x12)) == 0x12);
56
57int main()
58{
59 assert(ByteSwap(uint64_t(0x123456789ABCDEF0)) ==
60 0xF0DEBC9A78563412);
61 assert(ByteSwap(uint32_t(0x12345678)) == 0x78563412);
62 assert(ByteSwap(uint16_t(0x1234)) == 0x3412);
63 assert(ByteSwap(uint8_t(0x12)) == 0x12);
64}
65#else
66int main()
67{

Callers

nothing calls this directly

Calls 1

ByteSwapFunction · 0.70

Tested by

no test coverage detected