Add begin(), end() to TMaybeOwningArrayHolder.
@@ -13,6 +13,10 @@ namespace NCB {
template <class T>
class TMaybeOwningArrayHolder {
+ public:
+ using iterator = typename TArrayRef<T>::iterator;
+ using const_iterator = typename TArrayRef<T>::const_iterator;
+
public:
TMaybeOwningArrayHolder() = default;
@@ -87,6 +91,22 @@ namespace NCB {
return ArrayRef.size();
}
+ iterator begin() {
+ return ArrayRef.begin();
+ }
+
+ iterator end() {
+ return ArrayRef.end();
+ }
+
+ const_iterator begin() const {
+ return ArrayRef.begin();
+ }
+
+ const_iterator end() const {
+ return ArrayRef.end();
+ }
+
private:
TMaybeOwningArrayHolder(
TArrayRef<T> arrayRef,
