Changeset 1040 for trunk/yat/utility


Ignore:
Timestamp:
Feb 6, 2008, 1:42:53 AM (14 years ago)
Author:
Peter
Message:

working on #267

Location:
trunk/yat/utility
Files:
1 added
2 edited

Legend:

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

    r1037 r1040  
    4141     @brief Iterator
    4242  */
    43   template<typename T, typename Container>
     43  template<typename T>
    4444  class Iterator
    4545  {
     
    4949    typedef size_t difference_type;
    5050    typedef double* pointer;
    51     typedef T reference;
     51    typedef typename T::result_type reference;
     52    typedef typename T::container_type Container ;
    5253
    5354  private:
    54     typedef Iterator<reference, Container> self;
     55    typedef Iterator<T> self;
    5556
    5657  public:
     
    6869    Iterator(Container& container, difference_type index)
    6970      : container_(&container), index_(index) {}
    70 
    71     operator Iterator<const reference, const Container>()
    72     { return Iterator<const reference, const Container>(*container_, index_); }
    7371
    7472    /**
  • trunk/yat/utility/Makefile.am

    r1038 r1040  
    3636include_utility_HEADERS = \
    3737  Alignment.h ColumnStream.h CommandLine.h \
    38   Exception.h FileUtil.h Iterator.h iterator_traits.h \
     38  Exception.h FileUtil.h Functor.h Iterator.h iterator_traits.h \
    3939  IteratorWeighted.h kNNI.h matrix.h NNI.h \
    4040  Option.h OptionArg.h OptionFile.h OptionInFile.h OptionOutFile.h \
Note: See TracChangeset for help on using the changeset viewer.