3rdParty/boost/1.78.0/libs/hof/doc/src/concepts.md
Is an object with a const call operator:
concept ConstFunctionObject
{
template<class... Ts>
auto operator()(Ts&&...) const;
};
The type F satisfies ConstFunctionObject if
F satisfies std::is_object, andGiven
f, an object of type const Fargs..., suitable argument list, which may be empty+----------------+--------------------------+
| Expression | Requirements |
+================+==========================+
| ``f(args...)`` | performs a function call |
+----------------+--------------------------+
Is an object with a const call operator that accepts no parameters:
concept NullaryFunctionObject
{
auto operator()() const;
};
ConstFunctionObjectGiven
f, an object of type const F+----------------+--------------------------+
| Expression | Requirements |
+================+==========================+
| ``f()`` | performs a function call |
+----------------+--------------------------+
Is an object with a const call operator that accepts one parameter:
concept UnaryFunctionObject
{
template<class T>
auto operator()(T&&) const;
};
ConstFunctionObjectGiven
f, an object of type const Farg, a single argument+----------------+--------------------------+
| Expression | Requirements |
+================+==========================+
| ``f(arg)`` | performs a function call |
+----------------+--------------------------+
Is an object with a const call operator that accepts two parameter:
concept UnaryFunctionObject
{
template<class T, class U>
auto operator()(T&&, U&&) const;
};
ConstFunctionObjectGiven
f, an object of type const Farg1, a single argumentarg2, a single argument+-------------------+--------------------------+
| Expression | Requirements |
+===================+==========================+
| ``f(arg1, arg2)`` | performs a function call |
+-------------------+--------------------------+
Is an object with a mutable call operator:
concept MutableFunctionObject
{
template<class... Ts>
auto operator()(Ts&&...);
};
The type F satisfies MutableFunctionObject if
F satisfies std::is_object, andGiven
f, an object of type Fargs..., suitable argument list, which may be empty+----------------+--------------------------+
| Expression | Requirements |
+================+==========================+
| ``f(args...)`` | performs a function call |
+----------------+--------------------------+
Is an object that is either a NullaryFunctionObject, or it is an UnaryFuntionObject that accepts the identity function as a parameter.
NullaryFunctionObjectGiven
f, an object of type const F+----------------+--------------------------+
| Expression | Requirements |
+================+==========================+
| ``f()`` | performs a function call |
+----------------+--------------------------+
Or:
UnaryFuntionObjectGiven
f, an object of type const Fidentity, which is the identity function+-----------------+--------------------------+
| Expression | Requirements |
+=================+==========================+
| ``f(identity)`` | performs a function call |
+-----------------+--------------------------+
Is an object for which the INVOKE operation can be applied.
The type T satisfies Invocable if
Given
f, an object of type TArgs..., suitable list of argument typesThe following expressions must be valid:
+----------------------------------------+-------------------------------------------------------+
| Expression | Requirements |
+========================================+=======================================================+
| ``INVOKE(f, std::declval<Args>()...)`` | the expression is well-formed in unevaluated context |
+----------------------------------------+-------------------------------------------------------+
where INVOKE(f, x, xs...) is defined as follows:
if f is a pointer to member function of class U:
std::is_base_of<U, std::decay_t<decltype(x)>>() is true, then INVOKE(f, x, xs...) is equivalent to (x.*f)(xs...)std::decay_t<decltype(x)> is a specialization of std::reference_wrapper, then INVOKE(f, x, xs...) is equivalent to (x.get().*f)(xs...)INVOKE(f, x, xs...) is equivalent to ((*x).*f)(xs...).otherwise, if f is a pointer to data member of class U:
std::is_base_of<U, std::decay_t<decltype(x)>>() is true, then INVOKE(f, x) is equivalent to x.*fstd::decay_t<decltype(x)> is a specialization of std::reference_wrapper, then INVOKE(f, x) is equivalent to x.get().*fx does not satisfy the previous items, then INVOKE(f, x) is equivalent to (*x).*fotherwise, INVOKE(f, x, xs...) is equivalent to f(x, xs...)
Is an object for which the INVOKE operation can be applied.
The type T satisfies ConstInvocable if
Given
f, an object of type const TArgs..., suitable list of argument typesThe following expressions must be valid:
+----------------------------------------+-------------------------------------------------------+
| Expression | Requirements |
+========================================+=======================================================+
| ``INVOKE(f, std::declval<Args>()...)`` | the expression is well-formed in unevaluated context |
+----------------------------------------+-------------------------------------------------------+
where INVOKE(f, x, xs...) is defined as follows:
if f is a pointer to member function of class U:
std::is_base_of<U, std::decay_t<decltype(x)>>() is true, then INVOKE(f, x, xs...) is equivalent to (x.*f)(xs...)std::decay_t<decltype(x)> is a specialization of std::reference_wrapper, then INVOKE(f, x, xs...) is equivalent to (x.get().*f)(xs...)INVOKE(f, x, xs...) is equivalent to ((*x).*f)(xs...).otherwise, if f is a pointer to data member of class U:
std::is_base_of<U, std::decay_t<decltype(x)>>() is true, then INVOKE(f, x) is equivalent to x.*fstd::decay_t<decltype(x)> is a specialization of std::reference_wrapper, then INVOKE(f, x) is equivalent to x.get().*fx does not satisfy the previous items, then INVOKE(f, x) is equivalent to (*x).*fotherwise, INVOKE(f, x, xs...) is equivalent to f(x, xs...)
Is an object for which the INVOKE operation can be applied with one parameter.
ConstInvocableGiven
f, an object of type const Farg, a single argument+----------------------------------------+-------------------------------------------------------+
| Expression | Requirements |
+========================================+=======================================================+
| ``INVOKE(f, arg)`` | the expression is well-formed in unevaluated context |
+----------------------------------------+-------------------------------------------------------+
Is an object for which the INVOKE operation can be applied with two parameters.
ConstInvocableGiven
f, an object of type const Farg1, a single argumentarg2, a single argument+----------------------------------------+-------------------------------------------------------+
| Expression | Requirements |
+========================================+=======================================================+
| ``INVOKE(f, arg1, arg2)`` | the expression is well-formed in unevaluated context |
+----------------------------------------+-------------------------------------------------------+
Given
f, a type or a templateargs..., any suitable type, which may be empty+--------------------------+--------------------------------------------+
| Expression | Requirements |
+==========================+============================================+
| ``f::type`` | The type is the result of the metafunction |
+--------------------------+--------------------------------------------+
| ``f<args...>::type`` | The type is the result of the metafunction |
+--------------------------+--------------------------------------------+
Given
f, a type or a templateargs..., any suitable type, which may be empty+-----------------------------+--------------------------------------------+
| Expression | Requirements |
+=============================+============================================+
| ``f::apply::type`` | The type is the result of the metafunction |
+-----------------------------+--------------------------------------------+
| ``f::apply<args...>::type`` | The type is the result of the metafunction |
+-----------------------------+--------------------------------------------+