]> OCCT Git - occt.git/commitdiff
0026453: NCollection_StlIterator - declare reference getters as const
authorkgv <kgv@opencascade.com>
Fri, 17 Jul 2015 06:44:38 +0000 (09:44 +0300)
committerkgv <kgv@opencascade.com>
Fri, 17 Jul 2015 06:47:56 +0000 (09:47 +0300)
src/NCollection/NCollection_StlIterator.hxx

index e0c0baec5eb99151fc0d7ed5c36d83b0c7a16914..d666270ecda7d9de075420d72c6815958be0b4ac 100644 (file)
@@ -107,13 +107,13 @@ protected: //! @name methods related to forward STL iterator
   // an appropriate method based on template arguments (at instantiation time).
 
   template<bool Condition>
-  typename opencascade::enable_if<!Condition, ItemType&>::type Reference()
+  typename opencascade::enable_if<!Condition, ItemType&>::type Reference() const
   {
     return myIterator.ChangeValue();
   }
 
   template<bool Condition>
-  typename opencascade::enable_if<Condition, const ItemType&>::type Reference()
+  typename opencascade::enable_if<Condition, const ItemType&>::type Reference() const
   {
     return myIterator.Value();
   }
@@ -134,13 +134,13 @@ public: //! @name methods related to forward STL iterator
   }
 
   //! Get reference to current item
-  typename NCollection_StlIterator::reference operator*()
+  typename NCollection_StlIterator::reference operator*() const
   {
     return Reference<IsConstant>();
   }
 
   //! Dereferencing operator
-  typename NCollection_StlIterator::pointer operator->()
+  typename NCollection_StlIterator::pointer operator->() const
   {
     return &Reference<IsConstant>();
   }