vc_death.cpp 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // Copyright 2002 The Trustees of Indiana University.
  2. // Use, modification and distribution is subject to the Boost Software
  3. // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  4. // http://www.boost.org/LICENSE_1_0.txt)
  5. // Boost.MultiArray Library
  6. // Authors: Ronald Garcia
  7. // Jeremy Siek
  8. // Andrew Lumsdaine
  9. // See http://www.boost.org/libs/multi_array for documentation.
  10. //
  11. // index_bases - test of the index_base modifying facilities.
  12. //
  13. #include <boost/multi_array.hpp>
  14. #include <boost/core/lightweight_test.hpp>
  15. #include <boost/array.hpp>
  16. #include <vector>
  17. #include <iostream>
  18. int
  19. main()
  20. {
  21. typedef boost::multi_array<double, 3> array;
  22. typedef array::array_view<3>::type array_view;
  23. typedef array::extent_range erange;
  24. typedef array::index_range irange;
  25. array::extent_gen extents;
  26. array::index_gen indices;
  27. // Construct with nonzero bases
  28. {
  29. array A(extents[erange(1,4)][erange(2,5)][erange(3,6)]);
  30. array_view E = A[indices[irange(1,2)][irange(1,2)][irange(1,2)]];
  31. }
  32. return boost::report_errors();
  33. }