Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-30764

Add support for hashing in idl generated classes

    • Type: Icon: New Feature New Feature
    • Resolution: Declined
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: IDL, Internal Code
    • None
    • Service Arch
    • Fully Compatible

      A common extension of idl types is the generation of a hash function (for use in unordered containers).

      We currently have free functions in the codebase which use both all fields, as well as limited subsets, so a code reducing impl should include support for both.

      An example syntax might look like:

      For all fields:

      hash: all

      For a subset:

      hash: [a,c, b]

      I'm on the fence whether we should expose these as:

      • std::hash specializations
      • dependent types as T::Hash
      • adl lookup.

      We probably also want to support a facility for attaching a c++ function to a type as the hash function (to bootstrap user defined types)

            Assignee:
            backlog-server-servicearch [DO NOT USE] Backlog - Service Architecture
            Reporter:
            mira.carey@mongodb.com Mira Carey
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: