]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/multi_array/test/storage_order_convert.cpp
1 // Copyright 2002 The Trustees of Indiana University.
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)
7 // Boost.MultiArray Library
8 // Authors: Ronald Garcia
11 // See http://www.boost.org/libs/multi_array for documentation.
14 // test out my new storage_order stuff
17 #include <boost/core/lightweight_test.hpp>
19 #include <boost/multi_array/storage_order.hpp>
24 using namespace boost
;
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(),
31 general_storage_order
<5> fortran_storage(fortran_ordering
.begin(),
34 BOOST_TEST(c_storage
== (general_storage_order
<5>) c_storage_order());
35 BOOST_TEST(fortran_storage
==
36 (general_storage_order
<5>) fortran_storage_order());
38 return boost::report_errors();