Skip to content

Commit

Permalink
clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanhaining committed Feb 20, 2017
1 parent cce0ce6 commit 1330973
Show file tree
Hide file tree
Showing 32 changed files with 272 additions and 277 deletions.
12 changes: 6 additions & 6 deletions accumulate.hpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#ifndef ITER_ACCUMULATE_H_
#define ITER_ACCUMULATE_H_

#include "internal/iterbase.hpp"
#include "internal/iterator_wrapper.hpp"
#include "internal/iterbase.hpp"

#include <utility>
#include <iterator>
#include <functional>
#include <type_traits>
#include <iterator>
#include <memory>
#include <type_traits>
#include <utility>

namespace iter {
namespace impl {
Expand Down Expand Up @@ -46,8 +46,8 @@ class iter::impl::Accumulator {
std::unique_ptr<AccumVal> acc_val;

public:
Iterator(IteratorWrapper<Container>&& iter, IteratorWrapper<Container>&& end,
AccumulateFunc& in_accumulate_fun)
Iterator(IteratorWrapper<Container>&& iter,
IteratorWrapper<Container>&& end, AccumulateFunc& in_accumulate_fun)
: sub_iter{std::move(iter)},
sub_end{std::move(end)},
accumulate_func(&in_accumulate_fun),
Expand Down
20 changes: 12 additions & 8 deletions chain.hpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#ifndef ITER_CHAIN_HPP_
#define ITER_CHAIN_HPP_

#include "internal/iterbase.hpp"
#include "internal/iterator_wrapper.hpp"
#include "internal/iter_tuples.hpp"
#include "internal/iterator_wrapper.hpp"
#include "internal/iterbase.hpp"

#include <array>
#include <iterator>
Expand Down Expand Up @@ -156,19 +156,23 @@ class iter::impl::Chained {

template <typename TupType, std::size_t... Is>
constexpr std::array<typename iter::impl::Chained<TupType, Is...>::DerefFunc,
sizeof...(Is)> iter::impl::Chained<TupType, Is...>::derefers;
sizeof...(Is)>
iter::impl::Chained<TupType, Is...>::derefers;

template <typename TupType, std::size_t... Is>
constexpr std::array<typename iter::impl::Chained<TupType, Is...>::ArrowFunc,
sizeof...(Is)> iter::impl::Chained<TupType, Is...>::arrowers;
sizeof...(Is)>
iter::impl::Chained<TupType, Is...>::arrowers;

template <typename TupType, std::size_t... Is>
constexpr std::array<typename iter::impl::Chained<TupType, Is...>::IncFunc,
sizeof...(Is)> iter::impl::Chained<TupType, Is...>::incrementers;
sizeof...(Is)>
iter::impl::Chained<TupType, Is...>::incrementers;

template <typename TupType, std::size_t... Is>
constexpr std::array<typename iter::impl::Chained<TupType, Is...>::NeqFunc,
sizeof...(Is)> iter::impl::Chained<TupType, Is...>::neq_comparers;
sizeof...(Is)>
iter::impl::Chained<TupType, Is...>::neq_comparers;

template <typename Container>
class iter::impl::ChainedFromIterable {
Expand Down Expand Up @@ -208,8 +212,8 @@ class iter::impl::ChainedFromIterable {
}

public:
Iterator(
IteratorWrapper<Container>&& top_iter, IteratorWrapper<Container>&& top_end)
Iterator(IteratorWrapper<Container>&& top_iter,
IteratorWrapper<Container>&& top_end)
: top_level_iter{std::move(top_iter)},
top_level_end{std::move(top_end)},
sub_iter_p{!(top_iter != top_end)
Expand Down
10 changes: 5 additions & 5 deletions chunked.hpp
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#ifndef ITER_CHUNKED_HPP_
#define ITER_CHUNKED_HPP_

#include "internal/iterbase.hpp"
#include "internal/iteratoriterator.hpp"
#include "internal/iterator_wrapper.hpp"
#include "internal/iteratoriterator.hpp"
#include "internal/iterbase.hpp"

#include <vector>
#include <algorithm>
#include <type_traits>
#include <functional>
#include <utility>
#include <iterator>
#include <type_traits>
#include <utility>
#include <vector>

namespace iter {
namespace impl {
Expand Down
6 changes: 3 additions & 3 deletions combinations.hpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#ifndef ITER_COMBINATIONS_HPP_
#define ITER_COMBINATIONS_HPP_

#include "internal/iterbase.hpp"
#include "internal/iteratoriterator.hpp"
#include "internal/iterbase.hpp"

#include <vector>
#include <type_traits>
#include <iterator>
#include <type_traits>
#include <vector>

namespace iter {
namespace impl {
Expand Down
4 changes: 2 additions & 2 deletions combinations_with_replacement.hpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#ifndef ITER_COMBINATIONS_WITH_REPLACEMENT_HPP_
#define ITER_COMBINATIONS_WITH_REPLACEMENT_HPP_

#include "internal/iterbase.hpp"
#include "internal/iteratoriterator.hpp"
#include "internal/iterbase.hpp"

#include <iterator>
#include <vector>
#include <type_traits>
#include <vector>

namespace iter {
namespace impl {
Expand Down
5 changes: 2 additions & 3 deletions compress.hpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#ifndef ITER_COMPRESS_H_
#define ITER_COMPRESS_H_

#include "internal/iterbase.hpp"
#include "internal/iterator_wrapper.hpp"
#include "internal/iterbase.hpp"

#include <utility>
#include <iterator>
#include <utility>

namespace iter {
namespace impl {
Expand All @@ -15,7 +15,6 @@ namespace iter {

template <typename Container, typename Selector>
impl::Compressed<Container, Selector> compress(Container&&, Selector&&);

}

template <typename Container, typename Selector>
Expand Down
6 changes: 3 additions & 3 deletions cycle.hpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#ifndef ITER_CYCLE_H_
#define ITER_CYCLE_H_

#include "internal/iterbase.hpp"
#include "internal/iterator_wrapper.hpp"
#include "internal/iterbase.hpp"

#include <utility>
#include <iterator>
#include <initializer_list>
#include <iterator>
#include <utility>

namespace iter {
namespace impl {
Expand Down
10 changes: 5 additions & 5 deletions dropwhile.hpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#ifndef ITER_DROPWHILE_H_
#define ITER_DROPWHILE_H_

#include "internal/iterbase.hpp"
#include "internal/iterator_wrapper.hpp"
#include "filter.hpp"
#include "internal/iterator_wrapper.hpp"
#include "internal/iterbase.hpp"

#include <utility>
#include <iterator>
#include <utility>

namespace iter {
namespace impl {
Expand Down Expand Up @@ -57,8 +57,8 @@ class iter::impl::Dropper {
}

public:
Iterator(IteratorWrapper<Container>&& iter, IteratorWrapper<Container>&& end,
FilterFunc& in_filter_func)
Iterator(IteratorWrapper<Container>&& iter,
IteratorWrapper<Container>&& end, FilterFunc& in_filter_func)
: sub_iter{std::move(iter)},
sub_end{std::move(end)},
filter_func(&in_filter_func) {
Expand Down
6 changes: 3 additions & 3 deletions enumerate.hpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#ifndef ITER_ENUMERATE_H_
#define ITER_ENUMERATE_H_

#include "internal/iterbase.hpp"
#include "internal/iterator_wrapper.hpp"
#include "internal/iterbase.hpp"

#include <utility>
#include <iterator>
#include <functional>
#include <initializer_list>
#include <iterator>
#include <type_traits>
#include <utility>

namespace iter {
namespace impl {
Expand Down
14 changes: 8 additions & 6 deletions filter.hpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#ifndef ITER_FILTER_H_
#define ITER_FILTER_H_

#include "internal/iterbase.hpp"
#include "internal/iterator_wrapper.hpp"
#include "internal/iterbase.hpp"

#include <utility>
#include <iterator>
#include <initializer_list>
#include <iterator>
#include <utility>

namespace iter {
namespace impl {
Expand Down Expand Up @@ -69,9 +69,11 @@ class iter::impl::Filtered {
}

public:
Iterator(IteratorWrapper<Container>&& iter, IteratorWrapper<Container>&& end,
FilterFunc& in_filter_func)
: sub_iter{std::move(iter)}, sub_end{std::move(end)}, filter_func(&in_filter_func) {
Iterator(IteratorWrapper<Container>&& iter,
IteratorWrapper<Container>&& end, FilterFunc& in_filter_func)
: sub_iter{std::move(iter)},
sub_end{std::move(end)},
filter_func(&in_filter_func) {
if (this->sub_iter != this->sub_end) {
this->item.reset(*this->sub_iter);
}
Expand Down
2 changes: 1 addition & 1 deletion filterfalse.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef ITER_FILTER_FALSE_HPP_
#define ITER_FILTER_FALSE_HPP_

#include "internal/iterbase.hpp"
#include "filter.hpp"
#include "internal/iterbase.hpp"

#include <utility>

Expand Down
11 changes: 5 additions & 6 deletions groupby.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@

// this is easily the most functionally complex itertool

#include "internal/iterbase.hpp"
#include "internal/iterator_wrapper.hpp"
#include "internal/iterbase.hpp"

#include <type_traits>
#include <iterator>
#include <memory>
#include <type_traits>
#include <utility>
#include <iterator>

namespace iter {
namespace impl {
Expand Down Expand Up @@ -193,9 +193,8 @@ class iter::impl::GroupProducer {
}

// move-constructible, non-copy-constructible, non-assignable
Group(Group&& other) noexcept : owner(other.owner),
key{other.key},
completed{other.completed} {
Group(Group&& other) noexcept
: owner(other.owner), key{other.key}, completed{other.completed} {
other.completed = true;
}

Expand Down
2 changes: 1 addition & 1 deletion imap.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef ITER_IMAP_H_
#define ITER_IMAP_H_

#include "zip.hpp"
#include "starmap.hpp"
#include "zip.hpp"

#include <utility>

Expand Down
2 changes: 1 addition & 1 deletion internal/iter_tuples.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef ITERTOOLS_ITER_TUPLES_HPP_
#define ITERTOOLS_ITER_TUPLES_HPP_

#include "iterbase.hpp"
#include "iterator_wrapper.hpp"
#include "iterbase.hpp"

namespace iter {
namespace impl {
Expand Down
Loading

0 comments on commit 1330973

Please sign in to comment.