Concepts¶
ConstFunctionObject¶
Is an object with a const call operator:
concept ConstFunctionObject
{
template<class... Ts>
auto operator()(Ts&&...) const;
};
Requirements:¶
The type F satisfies ConstFunctionObject if
The type
Fsatisfiesstd::is_object, and
Given
f, an object of typeconst Fargs..., suitable argument list, which may be empty
Expression |
Requirements |
|---|---|
|
performs a function call |
NullaryFunctionObject¶
Is an object with a const call operator that accepts no parameters:
concept NullaryFunctionObject
{
auto operator()() const;
};
Requirements:¶
ConstFunctionObject
Given
f, an object of typeconst F
Expression |
Requirements |
|---|---|
|
performs a function call |
UnaryFunctionObject¶
Is an object with a const call operator that accepts one parameter:
concept UnaryFunctionObject
{
template<class T>
auto operator()(T&&) const;
};
Requirements:¶
ConstFunctionObject
Given
f, an object of typeconst Farg, a single argument
Expression |
Requirements |
|---|---|
|
performs a function call |
BinaryFunctionObject¶
Is an object with a const call operator that accepts two parameter:
concept UnaryFunctionObject
{
template<class T, class U>
auto operator()(T&&, U&&) const;
};
Requirements:¶
ConstFunctionObject
Given
f, an object of typeconst Farg1, a single argumentarg2, a single argument
Expression |
Requirements |
|---|---|
|
performs a function call |
MutableFunctionObject¶
Is an object with a mutable call operator:
concept MutableFunctionObject
{
template<class... Ts>
auto operator()(Ts&&...);
};
Requirements:¶
The type F satisfies MutableFunctionObject if
The type
Fsatisfiesstd::is_object, and
Given
f, an object of typeFargs..., suitable argument list, which may be empty
Expression |
Requirements |
|---|---|
|
performs a function call |
EvaluatableFunctionObject¶
Is an object that is either a NullaryFunctionObject, or it is an UnaryFuntionObject that accepts the identity function as a parameter.
Requirements:¶
NullaryFunctionObject
Given
f, an object of typeconst F
Expression |
Requirements |
|---|---|
|
performs a function call |
Or:
UnaryFuntionObject
Given
f, an object of typeconst Fidentity, which is the identity function
Expression |
Requirements |
|---|---|
|
performs a function call |
Invocable¶
Is an object for which the INVOKE operation can be applied.
Requirements:¶
The type T satisfies Invocable if
Given
f, an object of typeTArgs..., suitable list of argument types
The following expressions must be valid:
Expression |
Requirements |
|---|---|
|
the expression is well-formed in unevaluated context |
where INVOKE(f, x, xs...) is defined as follows:
if
fis a pointer to member function of classU:If
std::is_base_of<U, std::decay_t<decltype(x)>>()is true, thenINVOKE(f, x, xs...)is equivalent to(x.*f)(xs...)otherwise, if
std::decay_t<decltype(x)>is a specialization ofstd::reference_wrapper, thenINVOKE(f, x, xs...)is equivalent to(x.get().*f)(xs...)otherwise, if x does not satisfy the previous items, then
INVOKE(f, x, xs...)is equivalent to((*x).*f)(xs...).
otherwise, if
fis a pointer to data member of classU:If
std::is_base_of<U, std::decay_t<decltype(x)>>()is true, thenINVOKE(f, x)is equivalent tox.*fotherwise, if
std::decay_t<decltype(x)>is a specialization ofstd::reference_wrapper, thenINVOKE(f, x)is equivalent tox.get().*fotherwise, if
xdoes not satisfy the previous items, thenINVOKE(f, x)is equivalent to(*x).*f
otherwise,
INVOKE(f, x, xs...)is equivalent tof(x, xs...)
ConstInvocable¶
Is an object for which the INVOKE operation can be applied.
Requirements:¶
The type T satisfies ConstInvocable if
Given
f, an object of typeconst TArgs..., suitable list of argument types
The following expressions must be valid:
Expression |
Requirements |
|---|---|
|
the expression is well-formed in unevaluated context |
where INVOKE(f, x, xs...) is defined as follows:
if
fis a pointer to member function of classU:If
std::is_base_of<U, std::decay_t<decltype(x)>>()is true, thenINVOKE(f, x, xs...)is equivalent to(x.*f)(xs...)otherwise, if
std::decay_t<decltype(x)>is a specialization ofstd::reference_wrapper, thenINVOKE(f, x, xs...)is equivalent to(x.get().*f)(xs...)otherwise, if x does not satisfy the previous items, then
INVOKE(f, x, xs...)is equivalent to((*x).*f)(xs...).
otherwise, if
fis a pointer to data member of classU:If
std::is_base_of<U, std::decay_t<decltype(x)>>()is true, thenINVOKE(f, x)is equivalent tox.*fotherwise, if
std::decay_t<decltype(x)>is a specialization ofstd::reference_wrapper, thenINVOKE(f, x)is equivalent tox.get().*fotherwise, if
xdoes not satisfy the previous items, thenINVOKE(f, x)is equivalent to(*x).*f
otherwise,
INVOKE(f, x, xs...)is equivalent tof(x, xs...)
UnaryInvocable¶
Is an object for which the INVOKE operation can be applied with one parameter.
Requirements:¶
ConstInvocable
Given
f, an object of typeconst Farg, a single argument
Expression |
Requirements |
|---|---|
|
the expression is well-formed in unevaluated context |
BinaryInvocable¶
Is an object for which the INVOKE operation can be applied with two parameters.
Requirements:¶
ConstInvocable
Given
f, an object of typeconst Farg1, a single argumentarg2, a single argument
Expression |
Requirements |
|---|---|
|
the expression is well-formed in unevaluated context |
Metafunction¶
Given
f, a type or a templateargs..., any suitable type, which may be empty
Expression |
Requirements |
|---|---|
|
The type is the result of the metafunction |
|
The type is the result of the metafunction |
MetafunctionClass¶
Given
f, a type or a templateargs..., any suitable type, which may be empty
Expression |
Requirements |
|---|---|
|
The type is the result of the metafunction |
|
The type is the result of the metafunction |




