LLNL / ygm

Other
31 stars 22 forks source link

Feature/container traits #161

Closed youd3 closed 1 year ago

youd3 commented 1 year ago

Added tagging system to keep track of container traits. Associative containers now have ygm_key_type and ygm_mapped_type while collections just have ygm_value_type. ygm_container_type and ygm_for_alltypes are also implemented for all containers, as well as supporting is constexpr functions.

rogerpearce commented 1 year ago

Its looking good. Please add a size_type too and use it for size type things in the array and other place. Also note the merge conflict that needs resolving.

youd3 commented 1 year ago

Updated merge conflict, thanks! For size_type, is that just the datatype used to get the size of a ygm container? Will there be any situations where this isn't size_t (except for maybe array if the key type changes for some reason)?

steiltre commented 1 year ago

size_t is generally going to be correct, but you're right about array being a place where we could meaningfully change it.