operator[]
Bimap::operator[]
Returns the element according to the key passed in parameters.
Declaration
template <typename T, typename U>
U& operator[](const T& key);
Parameters
Name |
Type |
Description |
---|---|---|
key |
T |
The key of the element to return. |
Returns
A reference to the element associated with the key.
Declaration
template <typename T, typename U>
const U operator[](const T& key) const
Parameters
Name |
Type |
Description |
---|---|---|
key |
T |
The key of the element to return. |
Returns
A copy of the element associated with the key.
Declaration
template <typename T, typename U>
T& operator[](const U& key);
Parameters
Name |
Type |
Description |
---|---|---|
key |
U |
The key of the element to return. |
Returns
A reference to the element associated with the key.
Declaration
template <typename T, typename U>
const T operator[](const U& key) const
Parameters
Name |
Type |
Description |
---|---|---|
key |
U |
The key of the element to return. |
Returns
A copy of the element associated with the key.