Skip to content

A library for dictionaries which can safely contain values of multiple types.

License

LGPL-3.0, GPL-3.0 licenses found

Licenses found

LGPL-3.0
COPYING.LESSER
GPL-3.0
COPYING
Notifications You must be signed in to change notification settings

Geopipe/Cxx-Heterogeneous-Maps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cxx-Heterogeneous-Maps

A library for dictionaries which can safely contain values of multiple types. Probably requires C++17.

Provides two data structures:

  • One is a header-only type-safe map from strings to arbitrary values, which can be updated at runtime, but for which all keys and their types must be known at compile-time. All operations on the map itself are computed at compile-time, allowing type inference to be performed when looking up keys.
  • The second is type-safe map from strings to arbitrary values allowing the key-set to be determined at runtime. This relaxation means that type inference is not supported; however, the keys stored in the map contain a tag which can be pattern-matched upon using Mach7 to help recover type information if the stored types were previously forgotten in client code.

Note that these data-structures are both currently fairly "no-frills" in terms of the supported operations; however, we are happy to accept pull requests to support more advanced behaviors.

About

A library for dictionaries which can safely contain values of multiple types.

Resources

License

LGPL-3.0, GPL-3.0 licenses found

Licenses found

LGPL-3.0
COPYING.LESSER
GPL-3.0
COPYING

Stars

Watchers

Forks