38. Boost package for array manipulation

The array_boost module implements collection of array manipulation routines.

All functions and symbols are in “array_boost” module, use require to get access to it.

require daslib/array_boost

38.1. Temporary arrays

temp_array(arr: auto implicit ==const)

temp_array returns auto

Warning

This is unsafe operation.

argument

argument type

arr

auto implicit!

Creates temporary array from the given object. Important requirements are:

  • object memory is linear

  • each element follows the next one directly, with the stride equal to size of the element

  • object memory does not change within the lifetime of the returned array

temp_array(arr: auto const implicit ==const)

temp_array returns auto

Warning

This is unsafe operation.

argument

argument type

arr

auto const implicit!

Creates temporary array from the given object. Important requirements are:

  • object memory is linear

  • each element follows the next one directly, with the stride equal to size of the element

  • object memory does not change within the lifetime of the returned array

38.2. Empty check

empty(v: auto(VecT) const)

empty returns auto

argument

argument type

v

auto(VecT) const

returns true if ‘v’ has 0 elements. this also implies that length(v) is defined.