Add iterator for const version of UniquePtrList.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2020-05-31 18:50:22 +02:00
parent a3a0859b94
commit ad2d3be7e4
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
1 changed files with 3 additions and 0 deletions

View File

@ -12,6 +12,7 @@ namespace ArbUt {
private: private:
std::vector<ValueT*> _vector; std::vector<ValueT*> _vector;
using iterator = typename std::vector<ValueT*>::iterator; using iterator = typename std::vector<ValueT*>::iterator;
using const_iterator = typename std::vector<ValueT*>::const_iterator;
public: public:
inline UniquePtrList() : _vector() {} inline UniquePtrList() : _vector() {}
@ -62,6 +63,8 @@ namespace ArbUt {
iterator begin() { return _vector.begin(); } iterator begin() { return _vector.begin(); }
iterator end() { return _vector.end(); } iterator end() { return _vector.end(); }
const_iterator begin() const { return _vector.begin(); }
const_iterator end() const { return _vector.end(); }
ValueT* const* RawData() const { return _vector.data(); } ValueT* const* RawData() const { return _vector.data(); }