Template Struct executor

Struct Documentation

template<typename E>
struct executor

Concept that defines an executor.

An executor object is an object that can “execute” work. Given a functor compatible with

invocable_archetype, the executor will be able to execute that function, in some specified manner.
Template Parameters
  • E: The type that we want to model the concept

Properties that a type needs to have in order for it to be an executor:

  • it’s copy-constructible

  • the copy constructor is nothrow

  • it’s equality-comparable

  • one can call execute(obj, invocable_archetype{}), where obj is an object of the type

To be able to call execute() on an executor, the executor type must have one the following:

  • an inner method execute that takes a functor

  • an associated execute free function that takes the executor and a functor

  • an customization point tag_invoke(execute_t, Ex, Fn)

See

executor_of, execute_t, execute()