Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • Kea Kea
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 594
    • Issues 594
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 61
    • Merge requests 61
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • ISC Open Source ProjectsISC Open Source Projects
  • KeaKea
  • Issues
  • #2661
Closed
Open
Issue created Dec 01, 2022 by Francis Dupont@fdupontDeveloper

C++ warnings for (in)equality operators

C++20 tries to compile a == b as b == a too (same for !=). It emits a warning when the 2 variants have a different typing.

The fix is simple:

  • the unary version should be bool operator==(const T a) const, often the second const is missing.
  • the binary version should be bool operator==(const T a, const T b)

Fixing declaration with an incorrect type should remove warnings...

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking