Skip to content

"conditional expression is constant" warnings due to using if where if constexpr is appropriate #23

Description

@VioletGiraffe

There are 3 places in sparse_hash.h where MSVC gives the aforementioned warning (with /W4 level which is my default). All the conditions are indeed purely compile-time and should be replaced with constexpr. Will you accept a pull request if I fix this?

For example: if (sizeof(unsigned int) == sizeof(std::uint32_t))

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions