concept invocable =
requires(F&& f, Args&&... args) {
std::invoke(std::forward<F>(f), std::forward<Args>(args)...);
/* not required to be equality-preserving */
template< class F, class... Args >
concept regular_invocable = std::invocable<F, Args...>;
The invocable
concept specifies that a callable type F
can be called with a set of arguments Args...
using the function template std::invoke.
The regular_invocable
concept adds to the invocable
concept by requiring the invoke
expression to be equality-preserving and not modify either the function object or the arguments.
Expressions declared in requires expressions of the standard library concepts are required to be equality-preserving (except where stated otherwise).
[edit] NotesThe distinction between invocable
and regular_invocable
is purely semantic.
A random number generator may satisfy invocable
but cannot satisfy regular_invocable
(comical ones excluded).
invocable
[concept.invocable]regular_invocable
[concept.regularinvocable]invocable
[concept.invocable]regular_invocable
[concept.regularinvocable]invocable
and regular_invocable
.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4