| 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 | // concept_checks.cpp - |
| 15 | // make sure the types meet concept requirements |
| 16 | // |
| 17 | |
| 18 | #include <boost/concept_check.hpp> |
| 19 | #include <boost/multi_array/concept_checks.hpp> |
| 20 | #include <boost/multi_array.hpp> |
| 21 | |
| 22 | #include <boost/cstdlib.hpp> |
| 23 | |
| 24 | #include <boost/core/lightweight_test.hpp> |
| 25 | |
| 26 | #include <boost/array.hpp> |
| 27 | |
| 28 | int |
| 29 | main() |
| 30 | { |
| 31 | const int ndims=3; |
| 32 | typedef boost::multi_array<int,ndims> array; |
| 33 | typedef boost::multi_array_ref<int,ndims> array_ref; |
| 34 | typedef boost::const_multi_array_ref<int,ndims> const_array_ref; |
| 35 | typedef array::array_view<ndims>::type array_view; |
| 36 | typedef array::const_array_view<ndims>::type const_array_view; |
| 37 | typedef array::subarray<ndims>::type subarray; |
| 38 | typedef array::const_subarray<ndims>::type const_subarray; |
| 39 | |
| 40 | boost::function_requires< |
| 41 | boost::multi_array_concepts::ConstMultiArrayConcept<array,ndims> >(); |
| 42 | boost::function_requires< |
| 43 | boost::multi_array_concepts::ConstMultiArrayConcept<array_ref,ndims> >(); |
| 44 | boost::function_requires< |
| 45 | boost::multi_array_concepts::ConstMultiArrayConcept<const_array_ref,ndims> >(); |
| 46 | boost::function_requires< |
| 47 | boost::multi_array_concepts::ConstMultiArrayConcept<array_view,ndims> >(); |
| 48 | boost::function_requires< |
| 49 | boost::multi_array_concepts::ConstMultiArrayConcept<const_array_view,ndims> >(); |
| 50 | boost::function_requires< |
| 51 | boost::multi_array_concepts::ConstMultiArrayConcept<subarray,ndims> >(); |
| 52 | boost::function_requires< |
| 53 | boost::multi_array_concepts::ConstMultiArrayConcept<const_subarray,ndims> >(); |
| 54 | |
| 55 | boost::function_requires< |
| 56 | boost::multi_array_concepts::MutableMultiArrayConcept<array,ndims> >(); |
| 57 | boost::function_requires< |
| 58 | boost::multi_array_concepts::MutableMultiArrayConcept<array_ref,ndims> >(); |
| 59 | boost::function_requires< |
| 60 | boost::multi_array_concepts::MutableMultiArrayConcept<array_view,ndims> >(); |
| 61 | boost::function_requires< |
| 62 | boost::multi_array_concepts::MutableMultiArrayConcept<subarray,ndims> >(); |
| 63 | |
| 64 | return 0; |
| 65 | } |
| 66 | |