CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
iterator_deref.h
Go to the documentation of this file.
1 #ifndef Candidate_iterator_deref_h
2 #define Candidate_iterator_deref_h
3 
8 #include <boost/static_assert.hpp>
9 #include <vector>
10 
11 namespace reco {
12  namespace candidate {
13 
14  template<typename C>
15  struct iterator_deref {
16  BOOST_STATIC_ASSERT(sizeof(C) == 0);
17  };
18 
19  template<typename T>
20  struct iterator_deref<std::vector<T> > {
21  static const Candidate & deref( const typename std::vector<T>::const_iterator & i ) {
22  return * i;
23  }
24  };
25 
26  template<typename T>
27  struct iterator_deref<edm::OwnVector<T> > {
28  static const Candidate & deref( const typename edm::OwnVector<T>::const_iterator & i ) {
29  return * i;
30  }
31  };
32 
33  template<typename C>
34  struct iterator_deref<edm::RefVector<C> > {
35  static const Candidate & deref( const typename edm::RefVector<C>::const_iterator & i ) {
36  return * * i;
37  }
38  };
39 
40  template<typename T>
41  struct iterator_deref<std::vector<edm::RefToBase<T> > > {
42  static const Candidate & deref( const typename std::vector<edm::RefToBase<T> >::const_iterator & i ) {
43  return * * i;
44  }
45  };
46 
47  template<typename T>
48  struct iterator_deref<std::vector<edm::Ptr<T> > > {
49  static const Candidate & deref( const typename std::vector<edm::Ptr<T> >::const_iterator & i ) {
50  return * * i;
51  }
52  };
53  }
54 }
55 
56 #endif
int i
Definition: DBlmapReader.cc:9
static const Candidate & deref(const typename std::vector< edm::RefToBase< T > >::const_iterator &i)
static const Candidate & deref(const typename edm::RefVector< C >::const_iterator &i)
static const Candidate & deref(const typename edm::OwnVector< T >::const_iterator &i)
static const Candidate & deref(const typename std::vector< edm::Ptr< T > >::const_iterator &i)
static const Candidate & deref(const typename std::vector< T >::const_iterator &i)
edm::RefVector< Container > RefVector