diff --git a/uppsrc/Core/Topt.h b/uppsrc/Core/Topt.h index 68d5973e7..3082d9dee 100644 --- a/uppsrc/Core/Topt.h +++ b/uppsrc/Core/Topt.h @@ -344,6 +344,9 @@ public: template using ValueTypeOf = typename std::remove_referencebegin())>::type; +template +using ValueTypeOfArray = typename std::remove_reference::type; + template using IteratorOf = decltype(((Range *)0)->begin()); @@ -352,10 +355,10 @@ using ConstIteratorOf = decltype(((const Range *)0)->begin()); template class ConstIIterator { -protected: + typedef ValueTypeOfArray T; + const V *cont; int ii; - typedef ValueTypeOf T; struct NP { int dummy; }; public: @@ -394,10 +397,10 @@ public: template class IIterator { -protected: + typedef ValueTypeOfArray T; + V *cont; int ii; - typedef ValueTypeOf T; struct NP { int dummy; }; public: diff --git a/uppsrc/Core/todo.txt b/uppsrc/Core/todo.txt index d102385fe..0868954be 100644 --- a/uppsrc/Core/todo.txt +++ b/uppsrc/Core/todo.txt @@ -24,7 +24,6 @@ Buffer(size_t size, const T& init) { ptr = new T[size]; Fill(ptr, ptr + size, String MD5Digest(const void *data, int length); -IIterator typedef typename V::ValueType T; Remove ValueType uses InVector::InsertN possibly incorrect (can create small blocks) @@ -36,6 +35,8 @@ CoWork pipe max_queue ----------------------- DONE +IIterator typedef typename V::ValueType T; + SerializeRaw - int64! StringBuffer 2GB limit