nullptr pointer literal
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. |
Indice |
[modifica] Sintassi
nullptr
|
(dal C++11) | ||||||||
[modifica] Spiegazione
Il
da nullptr
parola chiave indica il puntatore nullo letterale. È un prvalue imprecisato di std::nullptr_t tipo. Esistono <div class="t-tr-text">conversioni impliciteOriginal:
implicit conversions
The text has been machine-translated via [http://translate.google.com Google Translate].
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.
nullptr
al valore di puntatore nullo di qualsiasi tipo e di qualsiasi puntatore puntatore al tipo di membro. Conversioni simili esistono per ogni valore di std::nullptr_t tipo nonché per la NULL macro, il puntatore nullo costante.Original:
The keyword
nullptr
denotes the null pointer literal. It is an unspecified prvalue of type std::nullptr_t. There exist conversioni implicite</div> from
Original:
implicit conversions
The text has been machine-translated via [http://translate.google.com Google Translate].
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.
nullptr
to null pointer value of any pointer type and any pointer to member type. Similar conversions exist for any value of type std::nullptr_t as well as for the macro NULL, the null pointer constant.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[modifica] Esempio
Viene illustrato come nullptr consente l'inoltro tramite una funzione di modello .
Original:
Demonstrates how nullptr allows forwarding via a template function.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Output:
Function g called Function g called Function g called
[modifica] Parole chiave
[modifica] Vedi anche
implementazione definita puntatore nullo costante Original: implementation-defined null pointer constant The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (macro costante) | |
(C++11) |
il tipo di puntatore nullo nullptr letterale Original: the type of the null pointer literal nullptr The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (typedef) |