Skip to content

cisstVector: removed base class std::iterator for all iterators (marked deprecated in c++ 17) #111

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions cisstVector/vctFixedStrideMatrixIterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
Author(s): Ofri Sadowsky, Anton Deguet
Created on: 2003-09-30

(C) Copyright 2003-2013 Johns Hopkins University (JHU), All Rights
Reserved.
(C) Copyright 2003-2025 Johns Hopkins University (JHU), All Rights Reserved.

--- begin cisst license - do not edit ---

Expand Down Expand Up @@ -87,8 +86,7 @@ no warranty. The complete license can be found in license.txt and
the same expression.
*/
template <class _elementType, vct::stride_type _columnStride, vct::size_type _numColumns, vct::stride_type _rowStride>
class vctFixedStrideMatrixConstIterator:
public std::iterator<std::random_access_iterator_tag, _elementType>
class vctFixedStrideMatrixConstIterator
{
public:
/* define most types from vctContainerTraits */
Expand All @@ -97,12 +95,9 @@ class vctFixedStrideMatrixConstIterator:
/*! The type of the iterator itself. */
typedef vctFixedStrideMatrixConstIterator<_elementType, _columnStride, _numColumns, _rowStride> ThisType;

/*! Base type for this iterator, i.e. std::iterator. */
typedef std::iterator<std::random_access_iterator_tag, _elementType> BaseType;

/*! Type (i.e. category) of iterator,
i.e. std::random_access_iterator_tag. */
typedef typename BaseType::iterator_category iterator_category;
typedef typename std::random_access_iterator_tag iterator_category;

enum {COL_STRIDE = _columnStride, ROW_STRIDE = _rowStride};
enum {NUM_COLUMNS = _numColumns};
Expand Down
11 changes: 3 additions & 8 deletions cisstVector/vctFixedStrideVectorIterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
Author(s): Ofri Sadowsky, Anton Deguet
Created on: 2003-09-30

(C) Copyright 2003-2013 Johns Hopkins University (JHU), All Rights
Reserved.
(C) Copyright 2003-2025 Johns Hopkins University (JHU), All Rights Reserved.

--- begin cisst license - do not edit ---

Expand Down Expand Up @@ -59,8 +58,7 @@ no warranty. The complete license can be found in license.txt and
\sa vctFixedStrideVectorIterator
*/
template <class _elementType, vct::stride_type _stride>
class vctFixedStrideVectorConstIterator:
public std::iterator<std::random_access_iterator_tag, _elementType>
class vctFixedStrideVectorConstIterator
{
public:
/* define most types from vctContainerTraits */
Expand All @@ -69,12 +67,9 @@ class vctFixedStrideVectorConstIterator:
/*! This of the iterator itself. */
typedef vctFixedStrideVectorConstIterator<_elementType, _stride> ThisType;

/*! Base type for this iterator, i.e. std::iterator. */
typedef std::iterator<std::random_access_iterator_tag, _elementType> BaseType;

/*! Type (i.e. category) of iterator,
i.e. std::random_access_iterator_tag. */
typedef typename BaseType::iterator_category iterator_category;
typedef typename std::random_access_iterator_tag iterator_category;

/* Stride between the elements of a vector. */
enum {STRIDE = _stride};
Expand Down
11 changes: 3 additions & 8 deletions cisstVector/vctVarStrideMatrixIterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
Author(s): Ofri Sadowsky, Anton Deguet
Created on: 2004-07-02

(C) Copyright 2004-2013 Johns Hopkins University (JHU), All Rights
Reserved.
(C) Copyright 2004-2025 Johns Hopkins University (JHU), All Rights Reserved.

--- begin cisst license - do not edit ---

Expand Down Expand Up @@ -37,8 +36,7 @@ no warranty. The complete license can be found in license.txt and
\sa vctVarStrideMatrixIterator
*/
template<class _elementType>
class vctVarStrideMatrixConstIterator:
public std::iterator<std::random_access_iterator_tag, _elementType>
class vctVarStrideMatrixConstIterator
{
public:
/* define most types from vctContainerTraits */
Expand All @@ -47,12 +45,9 @@ class vctVarStrideMatrixConstIterator:
/*! The type of the iterator itself. */
typedef vctVarStrideMatrixConstIterator<_elementType> ThisType;

/*! Base type for this iterator, i.e. std::iterator. */
typedef std::iterator<std::random_access_iterator_tag, _elementType> BaseType;

/*! Type (i.e. category) of iterator,
i.e. std::random_access_iterator_tag. */
typedef typename BaseType::iterator_category iterator_category;
typedef typename std::random_access_iterator_tag iterator_category;

protected:
/*! The data member points to the object being refered by this
Expand Down
12 changes: 3 additions & 9 deletions cisstVector/vctVarStrideNArrayIterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
Author(s): Daniel Li, Ofri Sadowsky, Anton Deguet
Created on: 2006-07-11

(C) Copyright 2006-2013 Johns Hopkins University (JHU), All Rights
Reserved.
(C) Copyright 2006-2025 Johns Hopkins University (JHU), All Rights Reserved.

--- begin cisst license - do not edit ---

Expand Down Expand Up @@ -43,9 +42,7 @@ no warranty. The complete license can be found in license.txt and
\sa vctVarStrideNArrayIterator
*/
template<class _ownerType, bool _forward>
class vctVarStrideNArrayConstIterator:
public std::iterator<std::random_access_iterator_tag,
typename _ownerType::value_type>
class vctVarStrideNArrayConstIterator
{
public:
/* define most types from vctContainerOwnerTraits and vctNArrayTraits */
Expand All @@ -64,12 +61,9 @@ class vctVarStrideNArrayConstIterator:
iterator points. */
typedef _ownerType OwnerType;

/*! Base type for this iterator, i.e. std::iterator. */
typedef std::iterator<std::random_access_iterator_tag, value_type> BaseType;

/*! Type (i.e. category) of iterator,
i.e. std::random_access_iterator_tag. */
typedef typename BaseType::iterator_category iterator_category;
typedef typename std::random_access_iterator_tag iterator_category;

protected:
/*! Pointer to the address of the container being referred to
Expand Down
11 changes: 3 additions & 8 deletions cisstVector/vctVarStrideVectorIterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
Author(s): Ofri Sadowsky, Anton Deguet
Created on: 2004-07-02

(C) Copyright 2004-2013 Johns Hopkins University (JHU), All Rights
Reserved.
(C) Copyright 2004-2025 Johns Hopkins University (JHU), All Rights Reserved.

--- begin cisst license - do not edit ---

Expand Down Expand Up @@ -53,8 +52,7 @@ no warranty. The complete license can be found in license.txt and
\sa vctVarStrideVectorIterator
*/
template<class _elementType>
class vctVarStrideVectorConstIterator:
public std::iterator<std::random_access_iterator_tag, _elementType>
class vctVarStrideVectorConstIterator
{
public:
/* define most types from vctContainerTraits */
Expand All @@ -63,12 +61,9 @@ class vctVarStrideVectorConstIterator:
/*! The type of the iterator itself. */
typedef vctVarStrideVectorConstIterator<_elementType> ThisType;

/*! Base type for this iterator, i.e. std::iterator. */
typedef std::iterator<std::random_access_iterator_tag, _elementType> BaseType;

/*! Type (i.e. category) of iterator,
i.e. std::random_access_iterator_tag. */
typedef typename BaseType::iterator_category iterator_category;
typedef typename std::random_access_iterator_tag iterator_category;

protected:
/*! The data member points to the object being refered by this
Expand Down