[SERVER-30764] Add support for hashing in idl generated classes Created: 21/Aug/17  Updated: 24/Aug/23  Resolved: 24/Aug/23

Status: Closed
Project: Core Server
Component/s: IDL, Internal Code
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Major - P3
Reporter: Mira Carey Assignee: Backlog - Service Architecture
Resolution: Declined Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-29864 Clarify/revisit how IDL-generated cla... Open
Assigned Teams:
Service Arch
Backwards Compatibility: Fully Compatible
Participants:

 Description   

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)



 Comments   
Comment by Lauren Lewis (Inactive) [ 21/Dec/21 ]

We haven’t heard back from you in at least 1 year, so I'm going to close this ticket. If this is still an issue for you, please provide additional information and we will reopen the ticket.

Generated at Thu Feb 08 04:24:55 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.