Keys and Values

This lesson is about the different properties of keys and values in this type of associative container.

There are special rules for the key and value of an unordered associative container.

The key has to be

  • comparable
  • available as hash value
  • copyable or moveable

The value has to be

  • default constructible
  • copyable or moveable

Get hands-on with 1200+ tech skills courses.