contiguous ranges provide the data() method to retrieve a pointer to the sequence

master
Daniel Kolesa 2015-07-23 01:32:22 +01:00
parent 7fc4ce0a3a
commit 287bdbd312
2 changed files with 3 additions and 1 deletions

View File

@ -942,6 +942,9 @@ struct PointerRange: InputRange<PointerRange<T>, ContiguousRangeTag, T> {
return copy(PointerRange(p, c), c);
}
T *data() { return p_beg; }
const T *data() const { return p_beg; }
private:
T *p_beg, *p_end;
};

View File

@ -142,7 +142,6 @@ public:
return true;
}
/* non-range methods */
T *data() { return p_beg; }
const T *data() const { return p_beg; }