Skip to content

bit_cast memcpy warnings with -Wall -Wextra #3000

Description

@fkallen

format.h: In instantiation of ‘To fmt::v9::detail::bit_cast(const From&) [with To = fmt::v9::detail::uint128_fallback; From = long double; typename std::enable_if<(sizeof (To) == sizeof (From)), int>::type = 0]’:
...

format.h:290:12: warning: ‘void* memcpy(void*, const void*, size_t)’ copying an object of non-trivial type ‘class fmt::v9::detail::uint128_fallback’ from an array of ‘const long double’ [-Wclass-memaccess]
290 | std::memcpy(&to, &from, sizeof(to));

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions