Type support (basic types, RTTI, type traits)
提供: cppreference.com
< cpp
![]() |
このページは、Google 翻訳を使って英語版から機械翻訳されました。
翻訳には誤りや奇妙な言い回しがあるかもしれません。文章の上にポインタをおくと、元の文章が見れます。誤りを修正して翻訳を改善する手助けをしてください。翻訳についての説明は、ここをクリックしてください。 |
[編集] 基本的なタイプ
[編集] 言語によって定義された基本的なタイプ
[編集] 追加の基本的な型とマクロ
Defined in header
<cstddef> | |
sizeof子によって戻された符号なし整数型 Original: unsigned integer type returned by the sizeof operator The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (typedef) | |
二つのポインタを減算したときに符号付き整数型が返されます Original: signed integer type returned when subtracting two pointers The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (typedef) | |
(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) |
実装定義のヌルポインタ定数 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) |
他のスカラー型として素晴らしいとアラインメント要件とPOD型 Original: POD type with alignment requirement as great as any other scalar type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (typedef) |
バイトは、標準レイアウトの種類の先頭から指定されたメンバへのオフセット Original: byte offset from the beginning of a standard-layout type to specified member The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (関数マクロ) | |
Defined in header
<cstdbool> | |
__bool_true_false_are_defined (C++11) |
定数C互換マクロは、整数定数1に展開されます Original: C compatibility macro constant, expands to integer constant 1 The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (マクロ定数) |
Defined in header
<cstdalign> | |
__alignas_is_defined (C++11) |
定数C互換マクロは、整数定数1に展開されます Original: C compatibility macro constant, expands to integer constant 1 The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (マクロ定数) |
[編集] 固定幅の整数型 (C++11およびそれ以降)
[編集] numeric_limitsの
Defined in header
<limits> | |
すべての基本的な数値型のクエリのプロパティへのインターフェイスを提供します. Original: provides an interface to query properties of all fundamental numeric types. The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) |
[編集] Cの数値は、インターフェイスを制限します
[編集] 実行時型識別
子によって戻されたこれはクラスですimplementation.typeid演算によって生成されたいくつかのタイプの情報を含んでいます Original: contains some type's information, generated by the implementation. This is the class, returned by the typeid演算 operator The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラス) | |
(C++11) |
連想のインデックスとして使用され、連想コンテナを順不同でき type_info オブジェクトのラッパー Original: wrapper around a type_info object, that can be used as index in associative and unordered associative containers The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラス) |
typeid演算式で引数がnullの場合にスローされる例外 Original: exception that is thrown if an argument in a typeid演算式 is null The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラス) | |
無効dynamic_cast式によってスローされる例外については、参照型のキャストに失敗、すなわち Original: exception that is thrown by an invalid dynamic_cast expression, i.e. a cast of reference type fails The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラス) |
[編集] 型の特徴NJ
型の特徴は、型のプロパティを照会または変更するには、コンパイル時にテンプレートベースのインタフェースを定義しています.
Original:
Type traits defines an compile-time template-based interface to query or modify the properties of types.
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.
[編集] Typeプロパティ
Defined in header
<type_traits> | |
Original: Primary type categories The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
(C++11) |
タイプかどうかをチェックするには、voidです Original: checks if a type is void 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: checks if a type is integral type 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: checks if a type is floating-point type 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: checks if a type is an array type 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: checks if a type is an enumeration type 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: checks if a type is an union type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) |
(C++11) |
checks if a type is a class type (but not union type) (クラステンプレート) |
(C++11) |
タイプかどうかをチェックするには、関数型である Original: checks if a type is a function type 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: checks if a type is a pointer type 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: checks if a type is lvalue 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: checks if a type is 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: checks if a type is a pointer to a non-static member object 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: checks if a type is a pointer to a non-static member function The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) |
Original: Composite type categories 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: checks if a type is fundamental type 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: checks if a type is arithmetic type 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: checks if a type is scalar type 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: checks if a type is object type 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: checks if a type is compound type 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: 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) |
checks if a type is a pointer to a non-static member function or object (クラステンプレート) |
Original: Type properties The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
(C++11) |
チェック型はconst修飾されている場合 Original: checks if a type is const-qualified The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) |
(C++11) |
チェックタイプはvolatile修飾されている場合 Original: checks if a type is volatile-qualified 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: checks if a type is trivial The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) |
(C++11) |
checks if a type is trivially copyable (クラステンプレート) |
(C++11) |
タイプかどうかをチェックするには、標準レイアウトタイプです Original: checks if a type is standard-layout type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) |
(C++11) |
タイプかどうかをチェックするには、明瞭な古いデータ(POD)タイプです Original: checks if a type is plain-old data (POD) type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) |
(C++11) |
checks if a type is literal type (クラステンプレート) |
(C++11) |
checks if a type is class (but not union) type and has no data (クラステンプレート) |
(C++11) |
タイプかどうかをチェックし、ポリモーフィッククラス型です Original: checks if a type is polymorphic class type 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: checks if a type is abstract class type 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: checks if a type is signed arithmetic type 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: checks if a type is unsigned arithmetic type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) |
Original: Supported operations The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
(C++11) (C++11) (C++11) |
タイプかどうかをチェックするには、特定の引数のコンストラクタを持っています Original: checks if a type has a constructor for specific arguments The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) |
タイプかどうかをチェックするには、デフォルトコンストラクタを持っています Original: checks if a type has a default constructor The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) | |
(C++11) (C++11) (C++11) |
タイプかどうかをチェックするには、コピーコンストラクタを持っています Original: checks if a type has a copy constructor The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) |
(C++11) (C++11) (C++11) |
タイプかどうかをチェックするには、移動コンストラクタを持っています Original: checks if a type has a move constructor The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) |
(C++11) (C++11) (C++11) |
タイプかどうかをチェックするには、特定の引数に代入演算子を持っています Original: checks if a type has a assignment operator for a specific argument The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) |
(C++11) (C++11) (C++11) |
タイプかどうかをチェックするには、コピー代入演算子を持っています Original: checks if a type has a copy assignment operator The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) |
(C++11) (C++11) (C++11) |
タイプかどうかをチェックするには、ムーブ代入演算子を持っています Original: checks if a type has a move assignment operator The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) |
(C++11) (C++11) (C++11) |
タイプかどうかをチェックするには、非削除されたデストラクタを持っています Original: checks if a type has a non-deleted destructor 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: checks if a type has a virtual destructor The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) |
Original: Property queries 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: obtains the type's alignment requirements 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: obtains the number of dimensions of an array type 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: obtains the size of an array type along a specified dimension The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) |
Original: Type relationships The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
(C++11) |
2種類の場合のチェックは同じです Original: checks if two types are the same The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) |
(C++11) |
checks if a type is derived from the other type (クラステンプレート) |
(C++11) |
タイプかどうかをチェックしますが、他の型に変換できます Original: checks if a type can be converted to the other type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) |
[編集] 型の変更
型の変更テンプレートはテンプレートのパラメータに変更を適用することにより、新しい型定義を作成します。結果の型は、その後のtypedef
type
部材を介してアクセスすることができます.Original:
Type modification templates create new type definitions by applying modifications on a template parameter. The resulting type can then be accessed through
type
member typedef.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.
Defined in header
<type_traits> | |
Original: Const-volatility specifiers The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
(C++11) (C++11) (C++11) |
指定した型からconstまたは/およびvolatile指定子を削除します Original: removes const or/and volatile specifiers 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. (クラステンプレート) |
(C++11) (C++11) (C++11) |
adds const or/and volatile specifiers to the given type (クラステンプレート) |
Original: References 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. (クラステンプレート) |
(C++11) (C++11) |
左辺値指定された型にや'右辺値参照が追加されます Original: adds lvalue or rvalue reference to 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. (クラステンプレート) |
Original: Pointers 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 pointer 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. (クラステンプレート) |
(C++11) |
指定された型へのポインタを追加します Original: adds pointer to 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. (クラステンプレート) |
Original: Sign modifiers 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: makes the given integral type signed 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: makes the given integral type unsigned The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) |
Original: Arrays The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
(C++11) |
指定された配列型から1エクステントを削除します Original: removes one extent from the given array type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) |
(C++11) |
removes all extents from the given array type (クラステンプレート) |
[編集] その他の変換
Defined in header
<type_traits> | |
(C++11) |
指定されたサイズのタイプのための初期化されていないストレージとして使用するのに適したタイプを定義します Original: defines the type suitable for use as uninitialized storage for types of given size 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: defines the type suitable for use as uninitialized storage for all given types 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: applies type transformations as when passing a function argument by value 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: hides a function overload or template specialization based on compile-time boolean The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) |
(C++11) |
コンパイルboolean型に基づいて、1種類または別のを選択します Original: chooses one type or another based on compile-type boolean The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) |
(C++11) |
deduces the result type of a mixed-mode arithmetic expression (クラステンプレート) |
(C++11) |
指定された列挙型の基礎となる整数型を取得します Original: obtains the underlying integer type for a given enumeration type 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: deduces the return type of a function call expression The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) |
[編集] ヘルパークラス
Defined in header
<type_traits> | |
(C++11) |
コンパイル時に指定された値を持つ指定された型の定数です Original: compile-time constant of specified type with specified value The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) |
タイプstd::integral_constantbool用の2つの専門分野が用意されています
Original:
Two specializations of std::integral_constant for the type bool are provided:
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.
Defined in header
<type_traits> | |
タイプ
Original: Type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Definition |
true_type
|
std::integral_constant<bool, true> |
false_type
|
std::integral_constant<bool, false> |