Opened 12 years ago

Closed 12 years ago

#608 closed defect (invalid)

missing reference_type in StrideIterator<double*>

Reported by: Peter Owned by: Peter
Priority: major Milestone:
Component: utility Version: trunk
Keywords: Cc:

Description

Trying to compile

typedef std::iterator_traits<utility::Vector::iterator>::reference_type rt;

I get following compiler warning (gcc 4.1)

‘reference_type’ in class ‘std::iterator_traits<theplu::yat::utility::StrideIterator<double*> >’ does not name a type

Change History (2)

comment:1 Changed 12 years ago by Peter

Owner: changed from Jari Häkkinen to Peter
Status: newassigned

StrideIterator contains the following (commented) code

/*
/// value type
typedef typename std::iterator_traits<Iter>::value_type value_type;
/// difference type
typedef typename std::iterator_traits<Iter>::difference_type difference_type;
/// reference
typedef typename std::iterator_traits<Iter>::reference reference;
/// pointer
typedef typename std::iterator_traits<Iter>::pointer pointer;
/// weighted_iterator_tag if iterator is weighted
typedef typename yat::utility::weighted_iterator_traits<Iter>::type w_type;
*/

Should this be included or is this supposed to be taken care of by the base class (from boost)?

comment:2 Changed 12 years ago by Peter

Milestone: yat 0.x+
Resolution: invalid
Status: assignedclosed

I should learn sthe standard before opening tickets. It's ::reference not ::reference_type.

Note: See TracTickets for help on using tickets.