Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
Main Page
Related Pages
Topics
Namespaces
Data Structures
Files
File List
Globals
EXTERNAL_HEADERS
RSL
tests
regress
26.valarray.sub.stdcxx-309.cpp
Go to the documentation of this file.
1
29
#include <cassert>
30
#include <cstddef>
31
#include <valarray>
32
33
int
main
()
34
{
35
const
int
a
[] = { 1, 2, 3, 4, 5, 6 };
36
37
const
std::valarray<int>
v
(
a
,
sizeof
a
/
sizeof
*
a
);
38
39
const
std::size_t
start
= 5;
40
std::valarray<std::size_t> length (1, 1);
41
std::valarray<std::size_t> stride (1, 1);
42
43
const
std::gslice gsl (
start
, length, stride);
44
45
for
(
int
i
= 0;
i
!= 2; ++
i
) {
46
const
std::valarray<int> vsl =
v
[gsl];
47
assert
(
a
[
start
] == vsl [0]);
48
}
49
50
return
0;
51
}
i
#define i
Definition
17.names.cpp:126
start
#define start
Definition
17.names.cpp:547
v
#define v
Definition
17.names.cpp:138
a
#define a
Definition
17.names.cpp:109
main
int main()
Definition
26.valarray.sub.stdcxx-309.cpp:33
assert
#define assert(expr)
Definition
_cassert.h:40
Generated by
1.9.8