Skip to content

Commit

Permalink
get rid of ssize_t
Browse files Browse the repository at this point in the history
  • Loading branch information
Hana Dusíková committed Mar 25, 2021
1 parent 217d292 commit 20294f0
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
5 changes: 3 additions & 2 deletions include/ctre/iterators.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include "literals.hpp"
#include "wrapper.hpp"
#include <cstddef>

namespace ctre {

Expand All @@ -17,7 +18,7 @@ template <typename BeginIterator, typename EndIterator, typename RE, typename Re
using iterator_category = std::forward_iterator_tag;
using pointer = void;
using reference = const value_type &;
using difference_type = ssize_t;
using difference_type = int;

BeginIterator orig_begin{};
BeginIterator current{};
Expand Down Expand Up @@ -95,7 +96,7 @@ template <typename BeginIterator, typename EndIterator, typename RE, typename Re
using iterator_category = std::forward_iterator_tag;
using pointer = void;
using reference = const value_type &;
using difference_type = ssize_t;
using difference_type = int;

BeginIterator orig_begin{};
BeginIterator current{};
Expand Down
2 changes: 1 addition & 1 deletion include/ctre/range.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ template <typename Range, typename RE> struct multi_subject_range {
using iterator_category = std::forward_iterator_tag;
using pointer = void;
using reference = const value_type &;
using difference_type = ssize_t;
using difference_type = int;

first_type first{};
last_type last{};
Expand Down
8 changes: 5 additions & 3 deletions single-header/ctre-unicode.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4443,6 +4443,8 @@ constexpr CTRE_FORCE_INLINE R evaluate(const Iterator begin, Iterator current, c
#ifndef CTRE_V2__CTRE__ITERATOR__HPP
#define CTRE_V2__CTRE__ITERATOR__HPP

#include <cstddef>

namespace ctre {

// TODO make proper iterator traits here
Expand All @@ -4456,7 +4458,7 @@ template <typename BeginIterator, typename EndIterator, typename RE, typename Re
using iterator_category = std::forward_iterator_tag;
using pointer = void;
using reference = const value_type &;
using difference_type = ssize_t;
using difference_type = int;

BeginIterator orig_begin{};
BeginIterator current{};
Expand Down Expand Up @@ -4534,7 +4536,7 @@ template <typename BeginIterator, typename EndIterator, typename RE, typename Re
using iterator_category = std::forward_iterator_tag;
using pointer = void;
using reference = const value_type &;
using difference_type = ssize_t;
using difference_type = int;

BeginIterator orig_begin{};
BeginIterator current{};
Expand Down Expand Up @@ -4678,7 +4680,7 @@ template <typename Range, typename RE> struct multi_subject_range {
using iterator_category = std::forward_iterator_tag;
using pointer = void;
using reference = const value_type &;
using difference_type = ssize_t;
using difference_type = int;

first_type first{};
last_type last{};
Expand Down
8 changes: 5 additions & 3 deletions single-header/ctre.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4440,6 +4440,8 @@ constexpr CTRE_FORCE_INLINE R evaluate(const Iterator begin, Iterator current, c
#ifndef CTRE_V2__CTRE__ITERATOR__HPP
#define CTRE_V2__CTRE__ITERATOR__HPP

#include <cstddef>

namespace ctre {

// TODO make proper iterator traits here
Expand All @@ -4453,7 +4455,7 @@ template <typename BeginIterator, typename EndIterator, typename RE, typename Re
using iterator_category = std::forward_iterator_tag;
using pointer = void;
using reference = const value_type &;
using difference_type = ssize_t;
using difference_type = int;

BeginIterator orig_begin{};
BeginIterator current{};
Expand Down Expand Up @@ -4531,7 +4533,7 @@ template <typename BeginIterator, typename EndIterator, typename RE, typename Re
using iterator_category = std::forward_iterator_tag;
using pointer = void;
using reference = const value_type &;
using difference_type = ssize_t;
using difference_type = int;

BeginIterator orig_begin{};
BeginIterator current{};
Expand Down Expand Up @@ -4675,7 +4677,7 @@ template <typename Range, typename RE> struct multi_subject_range {
using iterator_category = std::forward_iterator_tag;
using pointer = void;
using reference = const value_type &;
using difference_type = ssize_t;
using difference_type = int;

first_type first{};
last_type last{};
Expand Down

0 comments on commit 20294f0

Please sign in to comment.