MCPcopy Create free account
hub / github.com/PABannier/bark.cpp / reinterpret_bits

Function reinterpret_bits

examples/server/json.hpp:16831–16838  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16829
16830template<typename Target, typename Source>
16831Target reinterpret_bits(const Source source)
16832{
16833 static_assert(sizeof(Target) == sizeof(Source), "size mismatch");
16834
16835 Target target;
16836 std::memcpy(&target, &source, sizeof(Source));
16837 return target;
16838}
16839
16840struct diyfp // f * 2^e
16841{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected