Template Function librapid::evaluated(const T&)#

Function Documentation#

template<typename T>
auto librapid::evaluated(const T &other)#

Force the input to be evaluated to an Array.

When given a scalar or Array type, this function will return the input unchanged. When given a Function, it will evaluate the function and return the result. This is useful for functions which require an Array instance as input and cannot function with function types.

Note that the input is not copied or moved, so the returned Array will be a reference to the input.

Template Parameters

T – Input type

Parameters

other – Input

Returns

Evaluated input