aimstil  5.0.5
stditerator.h
Go to the documentation of this file.
1 #ifndef TIL_STDITERATOR_H
2 #define TIL_STDITERATOR_H
3 
4 // includes from BOOST
5 #include <boost/type_traits.hpp>
6 
7 namespace til{
8 namespace detail
9 {
11  template < typename T, bool b >
12  struct stdit { typedef typename T::iterator type; };
13 
14  template < typename T >
15  struct stdit<T, true> { typedef typename T::const_iterator type; };
16 }
17 
19 template < typename T, typename T2 = T >
20 struct stditerator : public detail::stdit<T, boost::is_const<T2>::value > {};
21 
22 } // namespace til
23 
24 #endif
25 
Select T2::const_iterator T is const, T2::iterator otherwise.
Definition: stditerator.h:20
Technical implementation detail for stditerator.
Definition: stditerator.h:12
Belongs to package Box Do not include directly, include til/Box.h instead.
Definition: Accumulator.h:10
T::iterator type
Definition: stditerator.h:12
T::const_iterator type
Definition: stditerator.h:15