libycxx

function template

std::bit_cast

Header
<bit>
Scope
std
cppreference
std::bit_cast

Synopsis

template<class To, class From>
  requires (sizeof(To) == sizeof(From) && is_trivially_copyable_v<To> && is_trivially_copyable_v<From>)
[[nodiscard]] constexpr To bit_cast(const From& from) noexcept;