std::error_category:: operator==,!=,<,<=>
From cppreference.net
<
cpp
|
error
|
error category
C++
Utilities library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Diagnostics library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::error_category
| Member functions | ||||
|
error_category::operator==
error_category::operator!=
error_category::operator<
error_category::operator<=>
(until C++20)
(until C++20)
(C++20)
|
|
bool
operator
==
(
const
error_category
&
rhs
)
const
noexcept
;
|
(1) | (desde C++11) |
|
bool
operator
!
=
(
const
error_category
&
rhs
)
const
noexcept
;
|
(2) |
(desde C++11)
(hasta C++20) |
|
bool
operator
<
(
const
error_category
&
rhs
)
const
noexcept
;
|
(3) |
(desde C++11)
(hasta C++20) |
|
std::
strong_ordering
operator
<=>
(
const
error_category
&
rhs
)
const
noexcept
;
|
(4) | (desde C++20) |
Compara con otra categoría de error.
1)
Comprueba si
*
this
y
rhs
hacen referencia al mismo objeto.
2)
Verifica si
*
this
y
rhs
no hacen referencia al mismo objeto.
3)
Ordena
*
this
y
rhs
según el orden de
this
y
&
rhs
. Equivalente a
std::
less
<
const
error_category
*
>
(
)
(
this,
&
rhs
)
.
4)
Ordena
*
this
y
rhs
por el orden de
this
y
&
rhs
. Equivalente a
std::
compare_three_way
(
)
(
this,
&
rhs
)
.
|
Los operadores
|
(desde C++20) |
Parámetros
| rhs | - |
especifica la
error_category
a comparar
|
Valor de retorno
1)
true
si
*
this
y
rhs
se refieren al mismo objeto,
false
en caso contrario.
2)
true
si
*
this
y
rhs
no se refieren al mismo objeto,
false
en caso contrario.
3)
true
si
*
this
es menor que
rhs
según el orden definido por
this
y
&
rhs
.
4)
std
::
strong_order
::
less
si
*
this
es menor que
rhs
según el orden de
this
y
&
rhs
, de lo contrario
std
::
strong_order
::
greater
si
rhs
es menor que
*
this
en el orden, de lo contrario
std
::
strong_order
::
equal
.