]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | // Copyright 2002 The Trustees of Indiana University. |
2 | ||
3 | // Use, modification and distribution is subject to the Boost Software | |
4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at | |
5 | // http://www.boost.org/LICENSE_1_0.txt) | |
6 | ||
7 | // Boost.MultiArray Library | |
8 | // Authors: Ronald Garcia | |
9 | // Jeremy Siek | |
10 | // Andrew Lumsdaine | |
11 | // See http://www.boost.org/libs/multi_array for documentation. | |
12 | ||
13 | // | |
14 | // test out my new storage_order stuff | |
15 | // | |
16 | ||
92f5a8d4 | 17 | #include <boost/core/lightweight_test.hpp> |
7c673cae | 18 | |
92f5a8d4 | 19 | #include <boost/multi_array/storage_order.hpp> |
7c673cae FG |
20 | |
21 | int | |
92f5a8d4 | 22 | main() { |
7c673cae FG |
23 | |
24 | using namespace boost; | |
25 | ||
26 | array<std::size_t,5> c_ordering = {{4,3,2,1,0}};; | |
27 | array<std::size_t,5> fortran_ordering = {{0,1,2,3,4}}; | |
28 | array<bool,5> ascending = {{true,true,true,true,true}}; | |
29 | general_storage_order<5> c_storage(c_ordering.begin(), | |
30 | ascending.begin()); | |
31 | general_storage_order<5> fortran_storage(fortran_ordering.begin(), | |
32 | ascending.begin()); | |
33 | ||
92f5a8d4 TL |
34 | BOOST_TEST(c_storage == (general_storage_order<5>) c_storage_order()); |
35 | BOOST_TEST(fortran_storage == | |
7c673cae FG |
36 | (general_storage_order<5>) fortran_storage_order()); |
37 | ||
92f5a8d4 | 38 | return boost::report_errors(); |
7c673cae | 39 | } |