- Timestamp:
- Oct 17, 2008, 10:11:26 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yat/utility/iterator_traits.h
r1565 r1591 47 47 48 48 49 namespace detail { 49 50 /** 50 51 \internal … … 72 73 typedef weighted_iterator_tag type; 73 74 }; 75 } // namespace detail 76 74 77 75 78 /** … … 88 91 \return weighted if value_type is DataWeight 89 92 */ 90 typedef typename weighted_iterator_traits_detail<value>::type type; 91 }; 92 93 93 typedef typename detail::weighted_iterator_traits_detail<value>::type type; 94 }; 95 96 97 namespace detail { 94 98 /** 95 99 \internal … … 120 124 typedef unweighted_iterator_tag type; 121 125 }; 126 } // namespace detail 122 127 123 128 /** … … 133 138 public: 134 139 /// return unweighted if both are unweighted 135 typedef typename unweighted_type_and<w_type1, w_type2>::type type;140 typedef typename detail::unweighted_type_and<w_type1, w_type2>::type type; 136 141 }; 137 142 … … 146 151 public: 147 152 /// return unweighted if all are unweighted 148 typedef typename unweighted_type_and<tmp, w_type3>::type type; 149 }; 150 151 /// check (at compile time) that iterator is unweighted. 152 inline void check_iterator_is_unweighted(unweighted_iterator_tag x){} 153 154 /** 155 check (at compile time) that iterator \a iter is unweighted. This 156 function is strictly not needed, but exists only for convenience. 153 typedef typename detail::unweighted_type_and<tmp, w_type3>::type type; 154 }; 155 156 namespace detail { 157 /// check (at compile time) that iterator is unweighted. 158 inline void 159 check_iterator_is_unweighted(utility::unweighted_iterator_tag x){} 160 } // namespace detail 161 162 /** 163 \brief check (at compile time) that iterator is unweighted. 164 165 This function only compiles if iterator \a iter is unweighted. 157 166 */ 158 167 template <class Iter> 159 168 void check_iterator_is_unweighted(Iter iter) 160 { check_iterator_is_unweighted(typename169 { detail::check_iterator_is_unweighted(typename 161 170 weighted_iterator_traits<Iter>::type()); 162 171 } 163 172 164 173 174 namespace detail { 165 175 /** 166 176 \internal … … 283 293 weight_reference weight(Iter iter) const { return (*iter).weight(); } 284 294 }; 285 295 } // namespace detail 286 296 287 297 /** … … 305 315 private: 306 316 typedef typename std::iterator_traits<Iter>::reference reference; 307 typedef iterator_traits_detail<Iter, reference> traits;317 typedef detail::iterator_traits_detail<Iter, reference> traits; 308 318 public: 309 319 /**
Note: See TracChangeset
for help on using the changeset viewer.