1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/stdapis/boost/multi_array/collection_concept.hpp Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -0,0 +1,62 @@
1.4 +// Copyright 2002 The Trustees of Indiana University.
1.5 +
1.6 +// Use, modification and distribution is subject to the Boost Software
1.7 +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
1.8 +// http://www.boost.org/LICENSE_1_0.txt)
1.9 +
1.10 +// Boost.MultiArray Library
1.11 +// Authors: Ronald Garcia
1.12 +// Jeremy Siek
1.13 +// Andrew Lumsdaine
1.14 +// See http://www.boost.org/libs/multi_array for documentation.
1.15 +
1.16 +#ifndef COLLECTION_CONCEPT_RG103101_HPP
1.17 +#define COLLECTION_CONCEPT_RG103101_HPP
1.18 +
1.19 +#include "boost/concept_check.hpp"
1.20 +
1.21 +namespace boost {
1.22 +namespace detail {
1.23 +namespace multi_array {
1.24 +
1.25 + //===========================================================================
1.26 + // Collection Concept
1.27 +
1.28 + template <class Collection>
1.29 + struct CollectionConcept
1.30 + {
1.31 + typedef typename Collection::value_type value_type;
1.32 + typedef typename Collection::iterator iterator;
1.33 + typedef typename Collection::const_iterator const_iterator;
1.34 + typedef typename Collection::reference reference;
1.35 + typedef typename Collection::const_reference const_reference;
1.36 + // typedef typename Collection::pointer pointer;
1.37 + typedef typename Collection::difference_type difference_type;
1.38 + typedef typename Collection::size_type size_type;
1.39 +
1.40 + void constraints() {
1.41 + boost::function_requires<boost::InputIteratorConcept<iterator> >();
1.42 + boost::function_requires<boost::InputIteratorConcept<const_iterator> >();
1.43 + boost::function_requires<boost::CopyConstructibleConcept<value_type> >();
1.44 + const_constraints(c);
1.45 + i = c.begin();
1.46 + i = c.end();
1.47 + c.swap(c);
1.48 + }
1.49 + void const_constraints(const Collection& c) {
1.50 + ci = c.begin();
1.51 + ci = c.end();
1.52 + n = c.size();
1.53 + b = c.empty();
1.54 + }
1.55 + Collection c;
1.56 + bool b;
1.57 + iterator i;
1.58 + const_iterator ci;
1.59 + size_type n;
1.60 + };
1.61 +
1.62 +}
1.63 +}
1.64 +}
1.65 +#endif // COLLECTION_CONCEPT_RG103101_HPP