get(const T& key) [Map template]

Gets the value of an entry in the map from its key. If the key does not exist, returns an empty value. See also the overload that allows you to specify the default value to be returned if the key does not exist.

This returns a copy of the value, so it's less efficient for complex values. See also operator[] which returns a reference to the value instead of a copy, and find() which returns an iterator for the value.

template<typename T>
ValueT get(const T& key) const;