std::type_info::before
来自 zh.cppreference.net
bool before( const type_info& rhs ) const;
|
(C++11 起 noexcept) | |
如果 this 的类型 true 在实现定义的排列顺序中位于 type_info 的类型 rhs 之前,则返回 true。不提供任何保证;特别是,排列顺序在同一程序的多次调用之间可能发生变化。
参数
| rhs | - | 要与之比较的另一个类型信息对象 |
返回值
若此
type_info
的类型在实现的有序排列中位于
rhs
的类型之前,则为
true
。
示例
运行此代码
可能的输出:
char goes before int in this implementation.
参见
|
(C++20 中移除)
|
检查对象是否引用相同类型
(公开成员函数) |