17 Jul
2017
17 Jul
'17
9:50 a.m.
Brook Milligan wrote:
- mp_is_map: type trait to determine whether a type is a map, i.e., has a unique set of keys
This is mp_is_set
, although not quite if M has an element that is not a list. Yes, that was also my implementation. I just punted on the question of whether or not mp_map_keys would always work. Given that it might not, this could be motivation for a more robust implementation in the library.
This also raises the question of what mp_is_set should do when passed something that is not a list - return false or cause a substitution failure (which in turn hints at the lack of mp_is_list as well). Thank you for you suggestions. They make sense and I'll probably add them.