xte ::array <T >::subrange ()
Defined in header <xte/data/array.hpp> Definition
Returns a subrange of copied or moved elements.[[nodiscard ]]constexpr xte ::array <T >subrange (this auto&& ,xte ::uz index ,xte ::uz size =-1uz )const noexcept (false );
Example
Output:xte ::array array = {1 ,2 ,3 ,4 ,5 };std ::println ("{}" ,array .subrange (1 ,3 ));
[View in Compiler Explorer][2, 3, 4]