OSDN Git Service

counter_iterator もちゃんとコンパイル通るようになりました。
authorMyun2 <myun2@nwhite.info>
Thu, 3 Jun 2010 17:40:10 +0000 (02:40 +0900)
committerMyun2 <myun2@nwhite.info>
Thu, 3 Jun 2010 17:40:10 +0000 (02:40 +0900)
roast/include/roast/container/indexer_iterator.hpp
roast/include/roast/container/linear_iterator_base.hpp
roast/test/roast_test_VC90/iterator_test.cpp

index 009704d..99c0465 100644 (file)
@@ -52,7 +52,13 @@ namespace roast{
                typedef _ValueType ValueType;
                typedef _IndexType IndexType;
                typedef _IndexType IteratorType;
-               
+
+               typedef _ValueType& ValueTypeRef;
+               typedef _ValueType* ValueTypePtr;
+               typedef const _ValueType CValueType;
+               typedef const _ValueType& CValueTypeRef;
+               typedef const _ValueType* CValueTypePtr;
+
        protected:
                ContainerMemberType m_con;
 
index 00c9219..bcc121a 100644 (file)
@@ -19,7 +19,13 @@ namespace roast
        {
        public:
                typedef T IteratorType;
+
                typedef T ValueType;
+               typedef T ValueTypeRef;
+               typedef T* ValueTypePtr;
+               typedef const T CValueType;
+               typedef const T CValueTypeRef;
+               typedef const T* CValueTypePtr;
        protected:
                T m_it;
 
@@ -48,7 +54,8 @@ namespace roast
                }
 
                //      Value
-               T& get_value_ref() const
+               //T& get_value_ref() const
+               T get_value_ref() const
                {
                        return m_it;
                }
index 633352d..4bfed26 100644 (file)
@@ -13,7 +13,7 @@ void main()
        work[0] = 1;
 
        //indexer_iterator<char*, char>::type a = _indexer_iterator_impl<char*, char>(work,32);
-       indexer_iterator<int*, int>::type a = make_indexer_iterator<int*, int>(work,1,lengthof(work));
+       indexer_iterator<int*, int>::type a = make_indexer_iterator<int*, int>(work,0,lengthof(work));
        counter_iterator ca(lengthof(work));
 
        //*a = 0;