std::type_info::before (3) - Linux Manuals
std::type_info::before: std::type_info::before
Command to display std::type_info::before
manual in Linux: $ man 3 std::type_info::before
NAME
std::type_info::before - std::type_info::before
Synopsis
bool before( const type_info& rhs ) const;
Returns true if the type of this type_info precedes the type of rhs in the implementation's collation order. No guarantees are given; in particular, the collation order can change between the invocations of the same program.
Parameters
rhs - another type information object to compare to
Return value
true if the type of this type_info precedes the type of rhs in the implementation's collation order.
Example
// Run this code
#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 in this implementation.\n";
}
Possible output:
char goes before int in this implementation.
See also
checks whether the objects refer to the same type
operator== (public member function)
operator!=
Pages related to std::type_info::before
- std::type_info::hash_code (3) - std::type_info::hash_code
- std::type_info::name (3) - std::type_info::name
- std::type_info::operator==,std::type_info::operator!= (3) - std::type_info::operator==,std::type_info::operator!=
- std::type_info::~type_info (3) - std::type_info::~type_info
- std::type_info (3) - std::type_info
- std::type_index (3) - std::type_index
- std::type_index::hash_code (3) - std::type_index::hash_code
- std::type_index::name (3) - std::type_index::name
- std::type_index::operator==,!=,<,<=,>,>= (3) - std::type_index::operator==,!=,<,<=,>,>=
- std::type_index::type_index (3) - std::type_index::type_index
- std::type_identity (3) - std::type_identity
- std::tan(std::complex) (3) - std::tan(std::complex)