1 // Copyright (C) 2002 Ronald Garcia
3 // Permission to copy, use, sell and distribute this software is granted
4 // provided this copyright notice appears in all copies.
5 // Permission to modify the code and to distribute modified code is granted
6 // provided this copyright notice appears in all copies, and a notice
7 // that the code was modified is included with the copyright notice.
9 // This software is provided "as is" without express or implied warranty,
10 // and with no claim as to its suitability for any purpose.
13 #ifndef COLLECTION_CONCEPT_RG103101_HPP
14 #define COLLECTION_CONCEPT_RG103101_HPP
16 #include "boost/concept_check.hpp"
20 namespace multi_array {
22 //===========================================================================
25 template <class Collection>
26 struct CollectionConcept
28 typedef typename Collection::value_type value_type;
29 typedef typename Collection::iterator iterator;
30 typedef typename Collection::const_iterator const_iterator;
31 typedef typename Collection::reference reference;
32 typedef typename Collection::const_reference const_reference;
33 // typedef typename Collection::pointer pointer;
34 typedef typename Collection::difference_type difference_type;
35 typedef typename Collection::size_type size_type;
38 boost::function_requires<boost::InputIteratorConcept<iterator> >();
39 boost::function_requires<boost::InputIteratorConcept<const_iterator> >();
40 boost::function_requires<boost::CopyConstructibleConcept<value_type> >();
46 void const_constraints(const Collection& c) {
62 #endif // COLLECTION_CONCEPT_RG103101_HPP