summaryrefslogtreecommitdiff
path: root/Ix/CPP/src
diff options
context:
space:
mode:
authorMatt <MattPD@users.noreply.github.com>2015-07-23 15:49:38 +0200
committerMatt <MattPD@users.noreply.github.com>2015-07-23 15:49:38 +0200
commite9af7aeb885a89db98c5e9f2353ea0622256b06c (patch)
tree81087a8d67ff342ef2e9780d8209d9fb18c4802c /Ix/CPP/src
parent257769cebad8694cd1bae79e931fcb20ded3d65a (diff)
downloadRxCpp-e9af7aeb885a89db98c5e9f2353ea0622256b06c.tar.gz
Update linq_cursor.hpp
Diffstat (limited to 'Ix/CPP/src')
-rw-r--r--Ix/CPP/src/cpplinq/linq_cursor.hpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/Ix/CPP/src/cpplinq/linq_cursor.hpp b/Ix/CPP/src/cpplinq/linq_cursor.hpp
index b5de908..4c5f5b5 100644
--- a/Ix/CPP/src/cpplinq/linq_cursor.hpp
+++ b/Ix/CPP/src/cpplinq/linq_cursor.hpp
@@ -4,6 +4,8 @@
#define CPPLINQ_LINQ_CURSOR_HPP
#pragma once
+#include <cstddef>
+
/// cursors
/// ----------
/// It should be noted that CppLinq uses a slightly different iterator concept, one where iterators
@@ -75,7 +77,7 @@ namespace cpplinq {
{
namespace detail
{
- template <size_t n> struct type_to_size { char value[n]; };
+ template <std::size_t n> struct type_to_size { char value[n]; };
type_to_size<1> get_category_from_iterator(std::input_iterator_tag);
type_to_size<2> get_category_from_iterator(std::forward_iterator_tag);
@@ -83,13 +85,13 @@ namespace cpplinq {
type_to_size<4> get_category_from_iterator(std::random_access_iterator_tag);
}
- template <size_t>
+ template <std::size_t>
struct iter_to_cursor_category_;
template <class Iter>
struct iter_to_cursor_category
{
- static const size_t catIx = sizeof(detail::get_category_from_iterator(typename std::iterator_traits<Iter>::iterator_category()) /*.value*/ );
+ static const std::size_t catIx = sizeof(detail::get_category_from_iterator(typename std::iterator_traits<Iter>::iterator_category()) /*.value*/ );
typedef typename iter_to_cursor_category_<catIx>::type type;
};
@@ -167,9 +169,9 @@ namespace cpplinq {
}
void skip(std::ptrdiff_t n) { current += n; }
- size_t size() { return fin-start; }
+ std::size_t size() { return fin-start; }
void position() { return current-start; }
- void truncate(size_t n) {
+ void truncate(std::size_t n) {
if (n > fin-current) {
fin = current + n;
}