Ignore:
Timestamp:
Feb 14, 2008, 10:54:19 PM (13 years ago)
Author:
Peter
Message:

fixes #329 rename weighted_type to weighted_iterator_tag

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/utility/iterator_traits.h

    r1089 r1092  
    3333    unweighted, which is the default.
    3434   */
    35   struct unweighted_type {
    36     typedef unweighted_type type;
    37   };
     35  struct unweighted_iterator_tag {};
    3836   
    3937  /**
     
    4341    unweighted cousin).
    4442   */
    45   struct weighted_type {
    46     typedef weighted_type type;
    47   };
     43  struct weighted_iterator_tag {};
    4844
    4945  /**
     
    5450  template <class T>
    5551  struct weighted_iterator_traits {
    56     typedef unweighted_type type;
     52    typedef unweighted_iterator_tag type;
    5753  };
    5854
     
    6460  template <class T1, class T2>
    6561  struct unweighted_type_and {
    66     typedef weighted_type type;
     62    typedef weighted_iterator_tag type;
    6763  };
    6864
     
    7268   */
    7369  template <>
    74   struct unweighted_type_and<unweighted_type, unweighted_type> {
    75     typedef unweighted_type type;
     70  struct unweighted_type_and<unweighted_iterator_tag, unweighted_iterator_tag> {
     71    typedef unweighted_iterator_tag type;
    7672  };
    7773
     
    9995
    10096  /// check (at compile time) that iterator is unweighted.
    101   inline void check_iterator_is_unweighted(unweighted_type x){}
     97  inline void check_iterator_is_unweighted(unweighted_iterator_tag x){}
    10298
    10399  /**
Note: See TracChangeset for help on using the changeset viewer.