Merge pull request #53 from xpol/fixes-reference-type-for-iterators

Fixes type for all iterator::reference.
This commit is contained in:
Thomas Fussell 2016-06-15 08:24:20 -04:00 committed by GitHub
commit e8c2dd37c3
6 changed files with 12 additions and 6 deletions

View File

@ -33,7 +33,7 @@ namespace xlnt {
class workbook;
class worksheet;
class XLNT_CLASS const_worksheet_iterator : public std::iterator<std::bidirectional_iterator_tag, const worksheet>
class XLNT_CLASS const_worksheet_iterator : public std::iterator<std::bidirectional_iterator_tag, const worksheet, std::ptrdiff_t, const worksheet*, const worksheet>
{
public:
const_worksheet_iterator(const workbook &wb, std::size_t index);

View File

@ -33,7 +33,7 @@ namespace xlnt {
class workbook;
class worksheet;
class XLNT_CLASS worksheet_iterator : public std::iterator<std::bidirectional_iterator_tag, worksheet>
class XLNT_CLASS worksheet_iterator : public std::iterator<std::bidirectional_iterator_tag, worksheet, std::ptrdiff_t, worksheet*, worksheet>
{
public:
worksheet_iterator(workbook &wb, std::size_t index);

View File

@ -23,6 +23,7 @@
// @author: see AUTHORS file
#pragma once
#include <cstddef> // std::ptrdiff_t
#include <iterator>
#include <xlnt/xlnt_config.hpp>
@ -37,7 +38,7 @@ class cell_reference;
class range_reference;
enum class major_order;
class XLNT_CLASS cell_iterator : public std::iterator<std::bidirectional_iterator_tag, cell>
class XLNT_CLASS cell_iterator : public std::iterator<std::bidirectional_iterator_tag, cell, std::ptrdiff_t, cell*, cell>
{
public:
cell_iterator(worksheet ws, const cell_reference &start_cell);

View File

@ -23,6 +23,7 @@
// @author: see AUTHORS file
#pragma once
#include <cstddef> // std::ptrdiff_t
#include <iterator>
#include <xlnt/xlnt_config.hpp>
@ -37,7 +38,7 @@ class cell_reference;
class range_reference;
enum class major_order;
class XLNT_CLASS const_cell_iterator : public std::iterator<std::bidirectional_iterator_tag, const cell>
class XLNT_CLASS const_cell_iterator : public std::iterator<std::bidirectional_iterator_tag, const cell, std::ptrdiff_t, const cell*, const cell>
{
public:
const_cell_iterator(worksheet ws, const cell_reference &start_cell);

View File

@ -22,6 +22,8 @@
// @author: see AUTHORS file
#pragma once
#include <cstddef> // std::ptrdiff_t
#include <xlnt/xlnt_config.hpp>
#include <xlnt/cell/cell_reference.hpp>
#include <xlnt/worksheet/major_order.hpp>
@ -40,7 +42,7 @@ struct worksheet_impl;
/// A const version of range_iterator which does not allow modification
/// to the dereferenced cell_vector.
/// </summary>
class XLNT_CLASS const_range_iterator : public std::iterator<std::bidirectional_iterator_tag, const cell_vector>
class XLNT_CLASS const_range_iterator : public std::iterator<std::bidirectional_iterator_tag, const cell_vector, std::ptrdiff_t, const cell_vector*, const cell_vector>
{
public:
const_range_iterator(

View File

@ -22,6 +22,8 @@
// @author: see AUTHORS file
#pragma once
#include <cstddef> // std::ptrdiff_t
#include <xlnt/xlnt_config.hpp>
#include <xlnt/cell/cell_reference.hpp>
#include <xlnt/worksheet/major_order.hpp>
@ -40,7 +42,7 @@ struct worksheet_impl;
/// An iterator used by worksheet and range for traversing
/// a 2D grid of cells by row/column then across that row/column.
/// </summary>
class XLNT_CLASS range_iterator : public std::iterator<std::bidirectional_iterator_tag, cell_vector>
class XLNT_CLASS range_iterator : public std::iterator<std::bidirectional_iterator_tag, cell_vector, std::ptrdiff_t, cell_vector*, cell_vector>
{
public:
range_iterator(worksheet &ws, const range_reference &start_cell, major_order order = major_order::row);