std::type_info::before
來自 cppreference.com
bool before( const type_info& rhs ) const; |
(C++11 起無異常丟擲) | |
如果此 type_info
的型別在實現的排序順序中位於 rhs 的型別之前,則返回 true。不作任何保證;特別是,排序順序在同一程式的呼叫之間可能會改變。
目錄 |
[編輯] 引數
rhs | - | 另一個用於比較的型別資訊物件 |
[編輯] 返回值
如果此 type_info
的型別在實現的排序順序中位於 rhs 的型別之前,則返回 true。
[編輯] 示例
執行此程式碼
可能的輸出
char goes before int in this implementation.
[編輯] 參閱
(在 C++20 中移除) |
檢查物件是否引用相同的型別 (公共成員函式) |