carb::cpp::bit_cast
Defined in carb/cpp/Bit.h
-
template<class To, class From>
To carb::cpp::bit_cast(const From &src) noexcept Re-interprets the bits
src
as typeTo
.See: https://en.cppreference.com/w/cpp/numeric/bit_cast
Note
The
To
andFrom
types must exactly match size and both be trivially copyable.- Template Parameters
To – The object type to convert to.
From – The (typically inferred) object type to convert from.
- Parameters
src – The source object to reinterpret.
- Returns
The reinterpreted object.