rheolef  6.5
get_pointer_from_iterator.h
Go to the documentation of this file.
1 #ifndef _RHEO_GET_POINTER_FROM_ITERATOR_H
2 #define _RHEO_GET_POINTER_FROM_ITERATOR_H
3 namespace rheolef {
4 template <class Iterator>
5 typename std::iterator_traits<Iterator>::pointer
6 get_pointer_from_iterator(Iterator iter) {
7  return iter.operator->();
8 }
9 template <class T>
10 typename std::iterator_traits<T*>::pointer
12  return iter;
13 }
14 } // namespace rheolef
15 #endif // _RHEO_GET_POINTER_FROM_ITERATOR_H
16