16
Library introduction
[library]
16.3
Method of description
[description]
16.3.3
Other conventions
[conventions]
16.3.3.2
Exposition-only entities, etc.
[expos.only.entity]
1
#
Several entities and
typedef-name
s
defined in
[support]
through
[thread]
and
[depr]
are only defined for the purpose of exposition
.
The declaration of such an entity or
typedef-name
is followed by a comment ending in
exposition only
.
2
#
The following are defined for exposition only to aid in the specification of the library:
🔗
namespace
std
{
template
<
class
T
>
requires
convertible_
to
<
T, decay_t
<
T
>
>
constexpr
decay_t
<
T
>
decay-copy
(
T
&
&
v
)
noexcept
(
is_nothrow_convertible_v
<
T, decay_t
<
T
>
>
)
//
exposition only
{
return
std
::
forward
<
T
>
(
v
)
;
}
constexpr
auto
synth-three-way
=
[
]
<
class
T,
class
U
>
(
const
T
&
t,
const
U
&
u
)
requires
requires
{
{
t
<
u
}
-
>
boolean-testable
;
{
u
<
t
}
-
>
boolean-testable
;
}
{
if
constexpr
(
three_
way_
comparable_
with
<
T, U
>
)
{
return
t
<
=
>
u;
}
else
{
if
(
t
<
u
)
return
weak_ordering
::
less;
if
(
u
<
t
)
return
weak_ordering
::
greater;
return
weak_ordering
::
equivalent;
}
}
;
template
<
class
T,
class
U
=
T
>
using
synth-three-way-result
=
decltype
(
synth-three-way
(
declval
<
T
&
>
(
)
, declval
<
U
&
>
(
)
)
)
;
}