Skip to content

Commit

Permalink
Added mutable fn
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc committed Feb 15, 2021
1 parent 0e5c02c commit b5e57f9
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion include/Lz/detail/ChunkIfIterator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace lz { namespace internal {
Iterator _subRangeBegin{};
Iterator _subRangeEnd{};
Iterator _end{};
FunctionContainer<UnaryPredicate> _predicate{};
mutable FunctionContainer<UnaryPredicate> _predicate{};
#ifdef LZ_HAS_EXECUTION
Execution _execution{};
#endif // LZ_HAS_EXECUTION
Expand Down
2 changes: 1 addition & 1 deletion include/Lz/detail/ExceptIterator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace lz { namespace internal {
Iterator _end{};
IteratorToExcept _toExceptBegin{};
IteratorToExcept _toExceptEnd{};
FunctionContainer<Compare> _compare{};
mutable FunctionContainer<Compare> _compare{};

#ifdef LZ_HAS_EXECUTION
Execution _execution{};
Expand Down
2 changes: 1 addition & 1 deletion include/Lz/detail/FilterIterator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ namespace lz { namespace internal {
private:
Iterator _iterator{};
Iterator _end{};
FunctionContainer<Function> _predicate{};
mutable FunctionContainer<Function> _predicate{};
#ifdef LZ_HAS_EXECUTION
Execution _execution{};
#endif // end has execution
Expand Down
4 changes: 2 additions & 2 deletions include/Lz/detail/GenerateIterator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


namespace lz { namespace internal {
template<LZ_CONCEPT_INVOCABLE GeneratorFunc>
template<class GeneratorFunc>
class GenerateIterator {
public:
using iterator_category = std::random_access_iterator_tag;
Expand All @@ -19,7 +19,7 @@ namespace lz { namespace internal {

private:
std::size_t _current{};
FunctionContainer<GeneratorFunc> _generator{};
mutable FunctionContainer<GeneratorFunc> _generator{};
bool _isWhileTrueLoop{};

public:
Expand Down
2 changes: 1 addition & 1 deletion include/Lz/detail/GroupByIterator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace lz { namespace internal {
Iterator _subRangeEnd{};
Iterator _subRangeBegin{};
Iterator _end{};
FunctionContainer<KeySelector> _keySelector{};
mutable FunctionContainer<KeySelector> _keySelector{};
#ifdef LZ_HAS_EXECUTION
Execution _execution{};
#endif // end LZ_HAS_EXECUTION
Expand Down
6 changes: 3 additions & 3 deletions include/Lz/detail/JoinWhereIterator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ namespace lz { namespace internal {
IterB _endB{};
IterA _iterAFound{};
IterB _iterBFound{};
FunctionContainer<SelectorA> _selectorA{};
FunctionContainer<SelectorB> _selectorB{};
FunctionContainer<ResultSelector> _resultSelector{};
mutable FunctionContainer<SelectorA> _selectorA{};
mutable FunctionContainer<SelectorB> _selectorB{};
mutable FunctionContainer<ResultSelector> _resultSelector{};
#ifdef LZ_HAS_EXECUTION
Execution _execution{};
#endif
Expand Down
2 changes: 1 addition & 1 deletion include/Lz/detail/MapIterator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace lz { namespace internal {
template<LZ_CONCEPT_ITERATOR Iterator, class Function>
class MapIterator {
Iterator _iterator{};
FunctionContainer<Function> _function{};
mutable FunctionContainer<Function> _function{};

public:
using reference = decltype(_function(*_iterator));
Expand Down
2 changes: 1 addition & 1 deletion include/Lz/detail/UniqueIterator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace lz { namespace internal {

Iterator _iterator{};
Iterator _end{};
FunctionContainer<Compare> _compare{};
mutable FunctionContainer<Compare> _compare{};
#ifdef LZ_HAS_EXECUTION
Execution _execution;
#endif // end lz has execution
Expand Down

0 comments on commit b5e57f9

Please sign in to comment.