Namespaces
Variants
Views
Actions

std::type_index::operator==,!=,<,<=,>,>=

From cppreference.com
< cpp‎ | types‎ | type index
Revision as of 14:50, 2 November 2012 by P12bot (Talk | contribs)

 
 
 
Type support
Basic types
Fundamental types
Fixed width integer types (C++11)
Numeric limits
C numeric limits interface
Runtime type information
Type traits
Primary type categories
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
Type properties
(C++11)
(C++11)
(C++11)
(C++14)
Supported operations
Relationships and property queries
(C++11)
(C++11)
(C++11)
(C++11)
Type modifications
(C++11)(C++11)(C++11)
Type transformations
(C++11)
(C++11)
(C++11)
Type trait constants
 
std::type_index
Member functions
type_index::operator=type_index::operator!=type_index::operator<type_index::operator<=type_index::operator>type_index::operator>=
 

Template:ddcl list begin <tr class="t-dcl ">

<td >
bool operator==( const type_index& rhs ) const;
</td>

<td class="t-dcl-nopad"> </td> <td > (since C++11) </td> </tr> <tr class="t-dcl ">

<td >
bool operator!=( const type_index& rhs ) const;
</td>

<td class="t-dcl-nopad"> </td> <td > (since C++11) </td> </tr> <tr class="t-dcl ">

<td >
bool operator<( const type_index& rhs ) const;
</td>

<td class="t-dcl-nopad"> </td> <td > (since C++11) </td> </tr> <tr class="t-dcl ">

<td >
bool operator<=( const type_index& rhs ) const;
</td>

<td class="t-dcl-nopad"> </td> <td > (since C++11) </td> </tr> <tr class="t-dcl ">

<td >
bool operator>( const type_index& rhs ) const;
</td>

<td class="t-dcl-nopad"> </td> <td > (since C++11) </td> </tr> <tr class="t-dcl ">

<td >
bool operator>=( const type_index& rhs ) const;
</td>

<td class="t-dcl-nopad"> </td> <td > (since C++11) </td> </tr> Template:ddcl list end

Compares the underlying std::type_info objects.

1-2) Checks whether the underlying std::type_info objects refer to the same type.

3-6) Compares the underlying std::type_info objects as defined by an implementation-defined ordering. The comparison is done by type_info::before.

Parameters

rhs - another type_index object to compare to

Return value

1) true if the underlying std::type_info objects refer to the same type, false otherwise

2) true if the underlying std::type_info objects refer not to the same type, false otherwise

3-6) true if the types referred by the underlying std::type_info objects are ordered by corresponding order, false otherwise.

Exceptions

noexcept specification:  
noexcept