若此type_info 的类型在实现的对照顺序中列于 rhs 的类型之前则为 true。 示例运行此代码 #include <iostream> #include <typeinfo> int main() { if(typeid(int).before(typeid(char))) std::cout << "此实现中 int 在 char 之前。\n"; else std::cout << "此实现中 char 在 int 之前。\n";...
若此type_info 的类型在实现的对照顺序中列于 rhs 的类型之前则为 true。 示例运行此代码 #include <iostream> #include <typeinfo> int main() { if(typeid(int).before(typeid(char))) std::cout << "int goes before char in this implementation.\n"; else std::cout << "char goes before int...
std::type_info::before C++ Utilities library Type support std::type_info boolbefore(consttype_info&rhs)const; (noexcept since C++11) Returnstrueif the type of thistype_infoprecedes the type ofrhsin the implementation's collation order. No guarantees are given; in particular, the collation ord...