24
Numerics library
[numerics]
24.8
Numeric arrays
[numarray]
24.8.4
Class
slice
[class.slice]
24.8.4.2
slice
constructors
[cons.slice]
🔗
slice(); slice(size_t start, size_t length, size_t stride); slice(const slice&);
1
#
The default constructor is equivalent to
slice(0, 0, 0)
.
A default constructor is provided only to permit the declaration of arrays of slices
.
The constructor with arguments for a slice takes a start, length, and stride parameter
.
2
#
[
 
Example
:
slice(3, 8, 2)
constructs a slice which selects elements 3, 5, 7,
.
.
.
17 from an array
.
—
 
end example
 
]