]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/multi_array/test/storage_order_convert.cpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / multi_array / test / storage_order_convert.cpp
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
17 #include "boost/test/minimal.hpp"
18
19 #include "boost/multi_array/storage_order.hpp"
20
21 int
22 test_main(int,char*[]) {
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
34 BOOST_CHECK(c_storage == (general_storage_order<5>) c_storage_order());
35 BOOST_CHECK(fortran_storage ==
36 (general_storage_order<5>) fortran_storage_order());
37
38 return boost::exit_success;
39 }