// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once #include #include namespace Common { template [[nodiscard]] std::enable_if_t && std::is_trivially_copyable_v, To> BitCast(const From& src) noexcept { To dst; std::memcpy(&dst, &src, sizeof(To)); return dst; } } // namespace Common