forked from OctaForge/libostd
contiguous ranges provide the data() method to retrieve a pointer to the sequence
This commit is contained in:
parent
7fc4ce0a3a
commit
287bdbd312
|
@ -942,6 +942,9 @@ struct PointerRange: InputRange<PointerRange<T>, ContiguousRangeTag, T> {
|
||||||
return copy(PointerRange(p, c), c);
|
return copy(PointerRange(p, c), c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
T *data() { return p_beg; }
|
||||||
|
const T *data() const { return p_beg; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
T *p_beg, *p_end;
|
T *p_beg, *p_end;
|
||||||
};
|
};
|
||||||
|
|
|
@ -142,7 +142,6 @@ public:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* non-range methods */
|
|
||||||
T *data() { return p_beg; }
|
T *data() { return p_beg; }
|
||||||
const T *data() const { return p_beg; }
|
const T *data() const { return p_beg; }
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue