std::type_info:: before
From cppreference.net
C++
Utilities library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Type support
| Basic types | |||||||||||||||||||||
| Fixed width integer types (C++11) | |||||||||||||||||||||
| Fixed width floating-point types (C++23) | |||||||||||||||||||||
|
|||||||||||||||||||||
| Numeric limits | |||||||||||||||||||||
| C numeric limits interface | |||||||||||||||||||||
| Runtime type information | |||||||||||||||||||||
|
|||||||||||||||||||||
std::type_info
| Member functions | ||||
|
(until C++20)
|
||||
|
type_info::before
|
||||
|
(C++11)
|
||||
|
bool
before
(
const
type_info
&
rhs
)
const
;
|
(C++11以降 noexcept) | |
この
type_info
の型が、実装の照合順序において
rhs
の型よりも前にある場合、
true
を返します。保証は一切ありません。特に、照合順序は同一プログラムの実行間で変更される可能性があります。
目次 |
パラメータ
| rhs | - | 比較対象の別の型情報オブジェクト |
戻り値
true
この
type_info
の型が、実装の照合順序において
rhs
の型よりも前にある場合。
例
このコードを実行
出力例:
char goes before int in this implementation.
関連項目
|
(removed in C++20)
|
オブジェクトが同じ型を参照しているかどうかをチェックする
(公開メンバ関数) |