nullptr pointer literal
提供: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. |
目次 |
[編集] 構文
nullptr
|
(C + + 11以来) | ||||||||
[編集] 説明
キーワード
からnullptr、リテラルNULLポインタを表します。それは型の不特定prvaluestd::nullptr_tです。任意のポインタ型とメンバの型へのポインタのポインタの値をnullに<div class="t-tr-text">暗黙の型変換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存在する。似たような変換は、タイプstd::nullptr_tの任意の値に対してだけでなく、マクロNULL、nullポインタ定数のために存在している.Original:
The keyword
nullptr denotes the null pointer literal. It is an unspecified prvalue of type std::nullptr_t. There exist 暗黙の型変換</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.
[編集] 例
nullptrを、テンプレート関数を介して転送することができる方法を示しています.
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
[編集] キーワード
[編集] も参照してください
| 実装定義のヌルポインタ定数 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. (マクロ定数) | |
| (C++11) |
nullポインタリテラルnullptrのタイプ 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です) |