GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
std::type_info::before(3) C++ Standard Libary std::type_info::before(3)

std::type_info::before - std::type_info::before


bool before( const type_info& rhs ) const; (until C++11)
bool before( const type_info& rhs ) const noexcept; (since C++11)


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.


rhs - another type information object to compare to


true if the type of this type_info precedes the type of rhs in the implementation's
collation order.

// 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";
}


char goes before int in this implementation.


operator== checks whether the objects refer to the same type
operator!= (public member function)
(removed in C++20)

2022.07.31 http://cppreference.com

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.