|
|
template<class BidirectionalRange> |
| void | reverse (BidirectionalRange &range) |
| | Range-based reverse, will be deprecated in C++20 in favor of std::ranges::reverse.
|
|
template<class BidirectionalRange, class OutputIterator> |
| void | reverse_copy (BidirectionalRange &range, OutputIterator result) |
| | Range-based reverse_copy algorithm, will be deprecated in C++20 in favor of std::ranges::reverse_copy.
|
|
template<class BidirectionalRange, class OutputIterator> |
| void | reverse_copy (const BidirectionalRange &range, OutputIterator result) |
| | Range-based reverse_copy algorithm, will be deprecated in C++20 in favor of std::ranges::reverse_copy.
|
|
template<typename I> |
| auto | reverse_until (I f, I m, I l) -> std::pair< I, I > |
| | Reverses the range [f, l) until m is reached. Returns a range [a, b) of the un-reversed subrange such that either a == m or b == m.
|
|
template<class F> |
| auto | invoke_waiting (F &&f) |
| | Assumes f will block waiting; on the portable task system, wakes the pool or adds a worker (up to the limit) before calling f.
|
|
template<class T> |
| auto | await (future< T > &&x) -> T |
| | Synchronously wait for the result x. If x resolves as an exception, the exception is rethrown. When using the portable task system, an additional thread is added to the pool if no threads are available and the maximum number of threads has not been reached.
|
|
template<class T> |
| auto | await (const future< T > &x) -> T |
| | Equivalent to await(copy(x)).
|
|
template<class T> |
| auto | await_for (future< T > &&x, const std::chrono::nanoseconds &timeout) -> future< T > |
|
template<class T> |
| auto | await_for (const future< T > &x, const std::chrono::nanoseconds &timeout) -> future< T > |
| | Equivalent to await_for(copy(x), timeout).
|
| template<class T> |
| auto | blocking_get (future< T > x) -> T |
| template<class T> |
| auto | blocking_get_for (future< T > x, const std::chrono::nanoseconds &timeout) -> future< T > |
| template<class T> |
| auto | blocking_get (future< T > x, const std::chrono::nanoseconds &timeout) -> decltype(x.get_try()) |
|
template<typename I, typename N, typename F> |
| auto | for_each_n (I p, N n, F f) -> I |
|
template<typename T, typename E> |
| auto | channel (E executor) |
| | Creates a sender/receiver pair on executor (receiver<void> only when T is void).
|
| template<typename S, typename F, typename... R> |
| auto | join (S s, F f, R... upstream_receiver) |
| template<typename S, typename F, typename... R> |
| auto | merge (S s, F f, R... upstream_receiver) |
| template<typename M, typename S, typename F, typename... R> |
| auto | merge_channel (S s, F f, R &&... upstream_receiver) |
| | Creates a receiver that merges upstream channels using merge strategy M.
|
| template<typename S, typename F, typename... R> |
| auto | zip_with (S s, F f, const R &... upstream_receiver) |
| | Creates a receiver that runs f when each upstream has produced one value.
|
| template<typename S, typename... R> |
| auto | zip (S s, const R &... r) |
| | Zips upstream receivers in step; yields std::tuple<T...> of their result_types.
|
|
auto | operator& (buffer_size bs, const executor &e) -> detail::annotations |
|
auto | operator& (buffer_size bs, executor &&e) -> detail::annotations |
|
auto | operator& (const executor &e, buffer_size bs) -> detail::annotations |
|
auto | operator& (executor &&e, buffer_size bs) -> detail::annotations |
|
template<typename F, std::enable_if_t<!std::is_enum_v< std::remove_reference_t< F > >, int > = 0> |
| auto | operator& (buffer_size bs, F &&f) -> detail::annotated_process< F > |
|
template<typename F, std::enable_if_t<!std::is_enum_v< std::remove_reference_t< F > >, int > = 0> |
| auto | operator& (F &&f, buffer_size bs) -> detail::annotated_process< F > |
|
template<typename F> |
| auto | operator& (executor_task_pair< F > &&etp, buffer_size bs) -> detail::annotated_process< F > |
|
template<typename F> |
| auto | operator& (buffer_size bs, executor_task_pair< F > &&etp) -> detail::annotated_process< F > |
|
template<typename F, std::enable_if_t<!std::is_enum_v< std::remove_reference_t< F > >, int > = 0> |
| auto | operator& (detail::annotations &&a, F &&f) -> detail::annotated_process< F > |
|
template<typename F, std::enable_if_t<!std::is_enum_v< std::remove_reference_t< F > >, int > = 0> |
| auto | operator& (F &&f, detail::annotations &&a) -> detail::annotated_process< F > |
|
template<typename F> |
| auto | operator& (detail::annotated_process< F > &&a, executor &&e) -> detail::annotated_process< F > |
|
template<typename F> |
| auto | operator& (detail::annotated_process< F > &&a, buffer_size bs) -> detail::annotated_process< F > |
|
template<typename Rep, typename Per = std::ratio<1>> |
| auto | execute_at (std::chrono::duration< Rep, Per > duration, executor_t executor) -> executor_t |
| | Returns an executor that posts tasks to executor after duration (immediate if zero).
|
| auto | execute_at (std::chrono::steady_clock::time_point when, executor_t executor) -> executor_t |
|
template<typename E, typename Rep, typename Per = std::ratio<1>> |
| auto | execute_delayed (std::chrono::duration< Rep, Per > duration, E executor) |
| | Returns an executor that delays each submitted task by duration before forwarding to executor.
|
|
template<typename F> |
| auto | operator& (executor e, F &&f) -> executor_task_pair< F > |
|
template<typename F> |
| auto | operator& (F &&f, executor e) -> executor_task_pair< F > |
|
template<class F, class... Args> |
| auto | invoke_void_to_monostate_result (F &&f, Args &&... args) |
| | Invokes f with args and returns its result, or std::monostate{} if the result is void.
|
|
template<class T> |
| auto | optional_monostate_to_bool (std::optional< T > &&o) |
| | Returns o.has_value() when T is std::monostate, otherwise std::move(o).
|
|
template<class T> |
| auto | monostate_to_void (T &&a) |
| | Converts std::monostate to void (no return); forwards other types unchanged.
|
|
template<class T> |
| auto | monostate_to_empty_tuple (T &&a) |
| | Converts std::monostate to std::tuple{}; wraps other types in std::tuple for uniform application.
|
|
template<class F, class... Args> |
| auto | invoke_remove_monostate_arguments (F &&f, Args &&... args) |
| | Invokes f with args after removing std::monostate values (for void future results).
|
| template<class Sig, class E, class F> |
| auto | package (E executor, F &&f) -> std::pair< detail::packaged_task_from_signature_t< Sig >, detail::reduced_result_t< Sig > > |
| | Creates a packaged task and its future for the callable f, run on executor.
|
|
template<class T, class E> |
| auto | future_with_broken_promise (E executor) -> detail::reduced_t< T > |
| | Returns a future of type T that is already ready with a broken_promise error (e.g. for canceled work).
|
| template<class E, class F, class... Ts> |
| auto | when_all (const E &executor, F f, future< Ts >... args) |
| | Returns a future that completes when all input futures are ready; f receives their values.
|
| template<class E, class F, class T, class... Ts> |
| auto | when_any (E &&executor, F &&f, future< T > &&arg, future< Ts > &&... args) |
| | Returns a future that completes when any of the given futures is ready; f receives the value and the index of the future that completed first (as a second argument of type std::size_t).
|
| template<class E, class F, class I> |
| auto | when_all (const E &executor, F f, std::pair< I, I > range) |
| | Returns a future that completes when all futures in [range.first, range.second) are ready; f receives their values.
|
| template<class E, class F, class I> |
| auto | when_any (const E &executor, F &&f, std::pair< I, I > range) |
| | Returns a future that completes when any future in [range.first, range.second) is ready; f receives the result and the index of the future that completed first (as a second argument of type std::size_t).
|
| template<class E, class F, class... Args> |
| auto | async (const E &executor, F &&f, Args &&... args) -> detail::reduced_t< detail::result_t< std::decay_t< F >, std::decay_t< Args >... > > |
| | Runs f with args on executor and returns a future for the result.
|
|
template<typename T, typename E> |
| auto | make_ready_future (T &&x, E executor) -> future< std::decay_t< T > > |
| | Creates a future already completed with x (executor runs attached continuations).
|
|
template<typename E> |
| auto | make_ready_future (E executor) -> future< void > |
| | Creates a future<void> already completed (executor runs attached continuations).
|
|
template<typename T, typename E> |
| auto | make_exceptional_future (const std::exception_ptr &error, E executor) -> future< T > |
| | Creates a future already failed with error (executor runs attached continuations).
|
|
void | set_current_thread_name (const char *name) |
|
template<typename T, typename Op> |
| auto | tuple_find (const T &t, Op op) -> std::size_t |
|
template<typename T, typename Op> |
| void | tuple_for_each (T &t, Op op) |
|
template<typename T, typename F, typename D> |
| auto | get_i (T &t, std::size_t index, F f, D &&default_v) |
|
template<typename T, typename F> |
| auto | void_i (T &t, std::size_t index, F &&f) |
|
template<class F, class Tuple> |
| constexpr auto | apply_ignore_placeholders (F &&f, Tuple &&t) -> decltype(auto) |
|
template<class Seq, class F, class Tuple> |
| constexpr auto | apply_indexed (F &&f, Tuple &&t) -> decltype(auto) |
|
constexpr auto | pivot (forest_edge e) |
| | Toggles a forest_edge between leading and trailing.
|
|
template<class I> |
| void | pivot (I &i) |
| | Flips the edge on iterator i in place.
|
|
template<class I> |
| auto | pivot_of (I i) |
| | Returns a copy of i with its edge toggled (pivot).
|
|
template<class I> |
| auto | leading_of (I i) |
| | Positions i on the leading edge of the same node.
|
|
template<class I> |
| auto | trailing_of (I i) |
| | Positions i on the trailing edge of the same node.
|
|
constexpr auto | is_leading (forest_edge e) |
| | True if e is a leading-edge position.
|
|
template<class I> |
| auto | is_leading (const I &i) |
| | True if iterator i is on its node’s leading edge.
|
|
constexpr auto | is_trailing (forest_edge e) |
| | True if e is a trailing-edge position.
|
|
template<class I> |
| auto | is_trailing (const I &i) |
| | True if iterator i is on its node’s trailing edge.
|
| template<class I> |
| auto | find_parent (I i) -> I |
| | Returns the trailing-edge iterator of the parent of the subtree containing i.
|
|
template<class I> |
| auto | has_children (const I &i) -> bool |
|
template<class I> |
| auto | find_edge (I x, forest_edge edge) -> I |
| | Advances x forward until x.edge() == edge (or returns last such position).
|
|
template<class I> |
| auto | find_edge_reverse (I x, forest_edge edge) -> I |
| | Advances x backward until x.edge() == edge.
|
|
template<class T> |
| auto | operator== (const forest< T > &x, const forest< T > &y) -> bool |
|
template<class T> |
| auto | operator!= (const forest< T > &x, const forest< T > &y) -> bool |
|
template<class I> |
| auto | child_begin (const I &x) -> child_iterator< I > |
| | First child iterator for the node referenced by fullorder iterator x (may equal child_end).
|
|
template<class I> |
| auto | child_end (const I &x) -> child_iterator< I > |
| | One-past-last child iterator for the node referenced by x (half-open child sequence).
|
|
template<class I> |
| auto | child_range (const I &x) |
| | forest_range of child_iterator over the immediate children of the node at x.
|
|
template<class R, typename P> |
| auto | filter_fullorder_range (R &x, P p) |
| | Range of filter_fullorder_iterator over x using predicate p.
|
|
template<class R, typename P> |
| auto | filter_fullorder_range (const R &x, P p) |
| | const overload: filters over const_iterators.
|
|
template<class R> |
| auto | reverse_fullorder_range (R &x) |
| | Reverses the fullorder traversal of x (see reverse_fullorder_iterator).
|
|
template<class R> |
| auto | reverse_fullorder_range (const R &x) |
| | const overload.
|
|
template<class R> |
| auto | depth_range (R &x) |
| | Fullorder walk with depth tracking over x (depth_fullorder_iterator).
|
|
template<class R> |
| auto | depth_range (const R &x) |
| | const overload.
|
|
template<class R> |
| auto | postorder_range (R &x) |
| | Postorder (trailing-edge) walk over x.
|
|
template<class R> |
| auto | postorder_range (const R &x) |
| | const overload.
|
|
template<class R> |
| auto | preorder_range (R &x) |
|
template<class R> |
| auto | preorder_range (const R &x) |
| | const overload.
|
|
template<typename T> |
| auto | unwrap (T &val) -> T & |
| | Unwraps val, forwarding through std::reference_wrapper when present.
|
|
template<typename T> |
| auto | unwrap (const T &val) -> const T & |
|
template<typename T> |
| auto | unwrap (std::reference_wrapper< T > &val) -> T & |
|
template<typename T> |
| auto | unwrap (const std::reference_wrapper< T > &val) -> const T & |
|
template<typename T> |
| auto | make_weak_ptr (const std::shared_ptr< T > &x) |
| | Returns a std::weak_ptr<T> sharing ownership with x.
|
|
void | stlab_pre_exit () |
| | An extern "C" vector for pre-exit() to make it simpler to export the function from a shared library.
|
|
void | stlab_at_pre_exit (pre_exit_handler f) |
| | An extern "C" vector for at_pre-exit() to make it simpler to export the function from a shared library.
|
|
void | pre_exit () |
| | Invoke all registered pre-exit handlers in the reverse order they are registered. It is safe to register additional handlers during this operation. Must be invoked exactly once prior to program exit.
|
|
void | at_pre_exit (pre_exit_handler f) |
| | Register a pre-exit handler. The pre-exit-handler may not throw. With C++17 or later it is required to be noexcept.
|
|
template<typename T, typename... Args> |
| auto | scope (Args &&... args) |
| | Scopes the lifetime of an instance of T. All but the last arguments construct T; the last argument is a nullary function invoked while T is alive. T is destroyed after that function returns.
|
| template<typename T, typename F> |
| auto | scope (std::mutex &m, F &&f) |
| | This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
|
template<bool P, class T> |
| constexpr auto | move_if (T &&t) noexcept -> detail::move_if_helper_t< P, T > |
| | If P is true, casts t to an rvalue; otherwise keeps an lvalue reference.
|
| template<class F, class... Args> |
| void | for_each_argument (F &&f, Args &&... args) |
| | Invokes f(arg0), f(arg1), … f(argN).
|
| template<typename T> |
| constexpr auto | copy (T &&value) noexcept(noexcept(std::decay_t< T >{static_cast< T && >(value)})) -> std::decay_t< T > |
| | Returns a copy of the argument. Used to pass an lvalue to a function taking an rvalue, or to copy a type with an explicit copy constructor.
|
|
template<class T> |
| constexpr auto | move (T &&t) noexcept -> std::remove_reference_t< T > && |
| | A standard move implementation but with a compile-time check for const types.
|