nullptr pointer literal
Da cppreference.com
![]() |
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
Índice |
[editar] Sintaxe
nullptr
|
(desde C++11) | ||||||||
[editar] Explicação
A palavra-chave
de nullptr
denota o ponteiro nulo literal. É um prvalue não especificado de std::nullptr_t tipo. Existem <div class="t-tr-text">conversões implícitasOriginal:
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
ao valor de ponteiro nulo de qualquer tipo de ponteiro e qualquer ponteiro para tipo de membro. Conversões semelhantes existem para qualquer valor de std::nullptr_t tipo, bem como para o NULL macro, o ponteiro nulo constante.Original:
The keyword
nullptr
denotes the null pointer literal. It is an unspecified prvalue of type std::nullptr_t. There exist conversões implícitas</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.
[editar] Exemplo
Demonstra como nullptr permite o encaminhamento através de uma função de modelo .
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.
Saída:
Function g called Function g called Function g called
[editar] Palavras-chave
[editar] Veja também
definida pela implementação ponteiro nulo constante 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 constante) | |
(C++11) |
o tipo de nullptr ponteiro nulo literal 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) |