KJB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
m_concept.h
Go to the documentation of this file.
1 /* $Id: m_concept.h 18278 2014-11-25 01:42:10Z ksimek $ */
2 /* {{{=========================================================================== *
3  |
4  | Copyright (c) 1994-2011 by Kobus Barnard (author)
5  |
6  | Personal and educational use of this code is granted, provided that this
7  | header is kept intact, and that the authorship is not misrepresented, that
8  | its use is acknowledged in publications, and relevant papers are cited.
9  |
10  | For other use contact the author (kobus AT cs DOT arizona DOT edu).
11  |
12  | Please note that the code in this file has not necessarily been adequately
13  | tested. Naturally, there is no guarantee of performance, support, or fitness
14  | for any particular task. Nonetheless, I am interested in hearing about
15  | problems that you encounter.
16  |
17  | Author: Kyle Simek
18  * =========================================================================== }}}*/
19 
20 // vim: tabstop=4 shiftwidth=4 foldmethod=marker
21 
22 #ifndef KJB_M_CPP_M_CONCEPT_H
23 #define KJB_M_CPP_M_CONCEPT_H
24 
25 #include <boost/concept_check.hpp>
26 
27 namespace kjb
28 {
29 template <class X>
31 {
32  typedef typename X::iterator iterator;
33  typedef typename X::const_iterator const_iterator;
34  typedef typename X::size_type size_type;
35  typedef typename X::value_type value_type;
37  {
38  size_t j = 0;
39 
40  i->size();
41  i->begin();
42  i->end();
43  (*i)[j];
44 
45  i2->size();
46  i2->begin();
47  i2->end();
48  (*i2)[j];
49  }
50 private:
51  X* i;
52  const X* i2;
53 };
54 
55 } // namespace kjb
56 #endif
X::size_type size_type
Definition: m_concept.h:34
BOOST_CONCEPT_USAGE(SimpleVector)
Definition: m_concept.h:36
Definition: m_concept.h:30
X::iterator iterator
Definition: m_concept.h:32
X::value_type value_type
Definition: m_concept.h:35
X::const_iterator const_iterator
Definition: m_concept.h:33