◐ Shell
clean mode source ↗

std::unordered_map::at - cppreference.com

Da cppreference.com.

Questa pagina è stata tradotta in modo automatico dalla versione in ineglese della wiki usando Google Translate.

La traduzione potrebbe contenere errori e termini strani. Muovi il puntatore sopra al testo per vedere la versione originale. Puoi aiutarci a correggere gli gli errori. Per ulteriori istruzioni clicca qui.

Click here for the English version of this page

<metanoindex/>

<tbody> </tbody>

T& at( const Key& key );

(1) (dal C++11)

const T & at( const Key& key ) const;

(2) (dal C++11)

Restituisce un riferimento al valore mappato dell'elemento con tasto equivalente a key. Se tale elemento non esiste, un'eccezione di tipo std::out_of_range viene gettato.

Original:

Returns a reference to the mapped value of the element with key equivalent to key. If no such element exists, an exception of type std::out_of_range is thrown.

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Parametri

key -

la chiave dell'elemento da trovare

Original:

the key of the element to find

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Valore di ritorno

Riferimento al valore mappato dell'elemento richiesto

Original:

Reference to the mapped value of the requested element

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Eccezioni

std::out_of_range se il contenitore non ha un elemento con la key specificato

Original:

std::out_of_range if the container does not have an element with the specified key

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Complessità

Average case: constant, worst case: linear in size.

Vedi anche

accedere elemento specificato

Original:

access specified element

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.


(metodo pubblico) [modifica]