Changeset 1092 for trunk/yat/utility


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

fixes #329 rename weighted_type to weighted_iterator_tag

Location:
trunk/yat/utility
Files:
2 edited

Legend:

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

    r1083 r1092  
    3939    typedef reference data_type;
    4040    typedef weight_t weight_type;
    41     typedef unweighted_type weighted_iterator_type;
     41    typedef unweighted_iterator_tag weighted_iterator_type;
    4242
    4343    data_type data(const Container& c, size_t row, size_t column) const
     
    6868    typedef data_t data_type;
    6969    typedef weight_t weight_type;
    70     typedef weighted_type weighted_iterator_type;
     70    typedef weighted_iterator_tag weighted_iterator_type;
    7171
    7272    data_type data(const Container& c, size_t row, size_t column) const
  • 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.