Changeset 1092 for trunk/yat/utility/iterator_traits.h
- Timestamp:
- Feb 14, 2008, 10:54:19 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yat/utility/iterator_traits.h
r1089 r1092 33 33 unweighted, which is the default. 34 34 */ 35 struct unweighted_type { 36 typedef unweighted_type type; 37 }; 35 struct unweighted_iterator_tag {}; 38 36 39 37 /** … … 43 41 unweighted cousin). 44 42 */ 45 struct weighted_type { 46 typedef weighted_type type; 47 }; 43 struct weighted_iterator_tag {}; 48 44 49 45 /** … … 54 50 template <class T> 55 51 struct weighted_iterator_traits { 56 typedef unweighted_ typetype;52 typedef unweighted_iterator_tag type; 57 53 }; 58 54 … … 64 60 template <class T1, class T2> 65 61 struct unweighted_type_and { 66 typedef weighted_ typetype;62 typedef weighted_iterator_tag type; 67 63 }; 68 64 … … 72 68 */ 73 69 template <> 74 struct unweighted_type_and<unweighted_ type, unweighted_type> {75 typedef unweighted_ typetype;70 struct unweighted_type_and<unweighted_iterator_tag, unweighted_iterator_tag> { 71 typedef unweighted_iterator_tag type; 76 72 }; 77 73 … … 99 95 100 96 /// check (at compile time) that iterator is unweighted. 101 inline void check_iterator_is_unweighted(unweighted_ typex){}97 inline void check_iterator_is_unweighted(unweighted_iterator_tag x){} 102 98 103 99 /**
Note: See TracChangeset
for help on using the changeset viewer.