Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
26.valarray.sub.stdcxx-224.cpp
Go to the documentation of this file.
1
28#include <cassert>
29#include <cstddef>
30#include <valarray>
31
32int main ()
33{
34 const int vals[] = { 1, 0 };
35 const std::size_t N = sizeof vals / sizeof *vals;
36
37 const std::valarray<int> p (vals, N);
38
39 assert (N == p.size ());
40
41 const std::valarray<int> r = p [std::slice (0, 0, 1)];
42
43 assert (0 == r.size ());
44}
#define N
Definition 17.names.cpp:157
#define r
Definition 17.names.cpp:134
#define p
Definition 17.names.cpp:132
#define assert(expr)
Definition _cassert.h:40