00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00026 #ifndef IH_SENF_senf_Utils_auto_unit_test_
00027 #define IH_SENF_senf_Utils_auto_unit_test_ 1
00028
00029
00030 #include <iterator>
00031 #include <boost/iterator/iterator_adaptor.hpp>
00032
00033
00034
00035 namespace senf {
00036 namespace test {
00037 namespace detail {
00038
00039 template <class Type, class Iterator>
00040 struct ConvertingIterator
00041 : public boost::iterator_adaptor<
00042 ConvertingIterator<Type, Iterator>, Iterator, Type, boost::use_default, Type>
00043 {
00044 typedef boost::iterator_adaptor<
00045 ConvertingIterator<Type, Iterator>, Iterator, Type, boost::use_default, Type> Base;
00046 ConvertingIterator(Iterator i) : Base (i) {}
00047 };
00048
00049 template <class Iterator, class vt = typename std::iterator_traits<Iterator>::value_type>
00050 struct NoCharIterator
00051 { typedef Iterator type; };
00052
00053 template <class Iterator>
00054 struct NoCharIterator<Iterator, char>
00055 { typedef ConvertingIterator<int,Iterator> type; };
00056
00057 template <class Iterator>
00058 struct NoCharIterator<Iterator, signed char>
00059 { typedef ConvertingIterator<int,Iterator> type; };
00060
00061 template <class Iterator>
00062 struct NoCharIterator<Iterator, unsigned char>
00063 { typedef ConvertingIterator<unsigned,Iterator> type; };
00064
00065 }}}
00066
00067
00068 #endif
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079