nullptr pointer literal
提供: cppreference.com
![]() | このページは、Google 翻訳を使って英語版から機械翻訳されました。 翻訳には誤りや奇妙な言い回しがあるかもしれません。文章の上にポインタをおくと、元の文章が見れます。誤りを修正して翻訳を改善する手助けをしてください。翻訳についての説明は、ここをクリックしてください。 |
目次 |
[編集]構文
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.
出力:
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) |