MCPcopy Create free account
hub / github.com/KaisenAmin/c_std / __array_transform_impl

Function __array_transform_impl

array/array.h:376–384  ·  view source on GitHub ↗

* @brief Internal implementation of array_transform. * * Applies a transformation function to each element of the source array and * writes the result to the destination array. */

Source from the content-addressed store, hash-verified

374 * The provided function must accept a pointer to an element.
375 * `func` may modify the elements, so the array must not be const
376 * (for a read-only pass over a const array use array_count_if /
377 * array_any_of / array_reduce).
378 */
379#define array_for_each(arr, func) \
380 arrayp_for_each_impl((arr).data, array_size(arr), sizeof((arr).data[0]), (func))
381
382
383/**
384 * @brief Internal implementation of array_transform.
385 *
386 * Applies a transformation function to each element of the source array and
387 * writes the result to the destination array.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected