Skip to content

Instantly share code, notes, and snippets.

@flyx
Created March 2, 2012 18:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flyx/1960309 to your computer and use it in GitHub Desktop.
Save flyx/1960309 to your computer and use it in GitHub Desktop.
with Ada.Containers.Hashed_Maps;
with Interfaces.C;
package Example is
type UInt is new Interfaces.C.unsigned;
type Whatever is new Integer;
function Hash (Key : UInt) return Ada.Containers.Hash_Type;
package My_Maps is new Ada.Containers.Hashed_Maps (
Key_Type => UInt,
Element_Type => Whatever,
Hash => Hash,
-- doesn't work
Equivalent_Keys => "=");
end Example;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment