std::add_lvalue_reference, std::add_rvalue_reference
提供: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. |
| Defined in header <type_traits>
|
||
| template< class T > struct add_lvalue_reference; |
(1) | (C + + 11以来) |
| template< class T > struct add_rvalue_reference; |
(2) | (C + + 11以来) |
Tは、オブジェクトまたは関数である場合、typeあるメンバのtypedefT&を提供しています。 Tいくつかの型Uへの右辺値参照である場合、typeU&です。それ以外の場合は、typeTです.Original:
If
T is an object or function, provides a member typedef type which is T&. If T is an rvalue reference to some type U, then type is U&. Otherwise, type is T.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.
Tは、オブジェクトまたは関数である場合、typeあるメンバのtypedefT&&を提供しています、そうでなければtypeTです.Original:
If
T is an object or function, provides a member typedef type which is T&&, otherwise type is T.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.
目次 |
[編集] メンバータイプ
| 名前
Original: Name The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Definition |
type
|
T、またはTへの参照が許可されていない場合Original: reference to T, or T if not allowedThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
[編集] ノート
これらの型変換は、基準崩壊のルールを尊重する
Original:
These type transformations honor reference collapse rules:
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.
std::add_lvalue_reference<T&>::type is T&
std::add_lvalue_reference<T&&>::type is T&
std::add_rvalue_reference<T&>::type is T&
std::add_rvalue_reference<T&&>::type is T&&
[編集] 例
| This section is incomplete Reason: no example |
[編集] も参照してください
| (C++11) |
タイプかどうかをチェックするには、どちらか左辺値参照や右辺値参照です Original: checks if a type is either lvalue reference or rvalue reference The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) |
| (C++11) |
指定された型から参照を削除します Original: removes reference from the given type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) |