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
[exec]
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
)
//
exposition only
noexcept
(
is_nothrow_convertible_v
<
T, decay_t
<
T
>
>
)
{
return
std
::
forward
<
T
>
(
v
)
;
}
constexpr
auto
synth-three-way
=
//
exposition only
[
]
<
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
=
//
exposition only
decltype
(
synth-three-way
(
declval
<
T
&
>
(
)
, declval
<
U
&
>
(
)
)
)
;
}
3
#
An object
dst
is said to be
decay-copied from
a subexpression
src
if the type of
dst
is
decay_t
<
decltype
(
(
src
)
)
>