From eaa611a529e09418a581e1cdfca659bb94aa6d2a Mon Sep 17 00:00:00 2001 From: cxl Date: Sat, 14 May 2016 18:16:07 +0000 Subject: [PATCH] Core: Fixed issue with [Cosnt]IIterator git-svn-id: svn://ultimatepp.org/upp/trunk@9832 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/Core/Topt.h | 11 +++++++---- uppsrc/Core/todo.txt | 3 ++- 2 files changed, 9 insertions(+), 5 deletions(-) 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