| 23 | #if !defined(__cpp_lib_bit_cast) || __cpp_lib_bit_cast < 201806L |
| 24 | template <typename To, typename From> |
| 25 | static inline To |
| 26 | bit_cast (From from) |
| 27 | { |
| 28 | static_assert (sizeof (From) == sizeof (To), "Type sizes do not match"); |
| 29 | union |
| 30 | { |
| 31 | From f; |
| 32 | To t; |
| 33 | } u; |
| 34 | u.f = from; |
| 35 | return u.t; |
| 36 | } |
| 37 | #endif |
| 38 | |
| 39 | void |
nothing calls this directly
no outgoing calls
no test coverage detected