start_size_stride.pass.cpp 608 B

12345678910111213141516171819202122232425
  1. //===----------------------------------------------------------------------===//
  2. //
  3. // The LLVM Compiler Infrastructure
  4. //
  5. // This file is dual licensed under the MIT and the University of Illinois Open
  6. // Source Licenses. See LICENSE.TXT for details.
  7. //
  8. //===----------------------------------------------------------------------===//
  9. // <valarray>
  10. // class slice;
  11. // slice(size_t start, size_t size, size_t stride);
  12. #include <valarray>
  13. #include <cassert>
  14. int main()
  15. {
  16. std::slice s(1, 3, 2);
  17. assert(s.start() == 1);
  18. assert(s.size() == 3);
  19. assert(s.stride() == 2);
  20. }