Namespaces
Variants
Views
Actions

std::char_traits::eq, std::char_traits::lt

From cppreference.com
< cpp‎ | string‎ | char traits
Revision as of 02:15, 25 February 2013 by 2hertz (Talk | contribs)

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

<tr class="t-dcl ">

<td >
static bool eq( char_type a, char_type b );
</td>

<td > (1) </td> <td > (until C++11) </td> </tr> <tr class="t-dcl-sep"><td></td><td></td><td></td></tr>

<tr class="t-dcl ">

<td >
static constexpr bool eq( char_type a, char_type b ) noexcept;
</td>

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

<tr class="t-dcl ">

<td >
static bool lt( char_type a, char_type b );
</td>

<td > (2) </td> <td > (until C++11) </td> </tr> <tr class="t-dcl-sep"><td></td><td></td><td></td></tr>

<tr class="t-dcl ">

<td >
static constexpr bool lt( char_type a, char_type b ) noexcept;
</td>

<td > (2) </td> <td > (since C++11) </td> </tr> Template:ddcl list end

Compares two characters.

1) Compares a and b for equality.
2) Compares a and b in such a way that they are totally ordered.

Contents

Parameters

a, b - character values to compare

Return value

1) true if a and b are equal, false otherwise.
2) true if a is less than b, false otherwise.

Exceptions

noexcept specification:  
noexcept
  

Complexity

Constant.