-
Type: New Feature
-
Resolution: Declined
-
Priority: 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)
- is related to
-
SERVER-29864 Clarify/revisit how IDL-generated classes fit into larger C++ classes
- Open