Skip to content

Extending memcmp optimization to classes #1591

Description

With C++20 it's possible to default comparison operators. With has_unique_object_representations and an intrinsic to detect if type is trivially equality comparable (it has defaulted operator== and all of it's members are trivially equality comparable) we could greatly increase number of cases when equal uses memcmp.

It would be great if we could default operator== for types like tuple and pair, but I don't know if we can do that.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions