Skip to content

Commit

Permalink
drops init list support from enumerate
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanhaining committed Apr 8, 2016
1 parent 66d106f commit 8d29587
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions enumerate.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include <utility>
#include <iterator>
#include <functional>
#include <initializer_list>
#include <type_traits>

namespace iter {
Expand All @@ -18,9 +17,6 @@ namespace iter {
template <typename Container>
impl::Enumerable<Container> enumerate(Container&&, std::size_t = 0);

template <typename T>
impl::Enumerable<std::initializer_list<T>> enumerate(
std::initializer_list<T>, std::size_t = 0);
}

template <typename Container>
Expand All @@ -32,9 +28,6 @@ class iter::impl::Enumerable {
// The only thing allowed to directly instantiate an Enumerable is
// the enumerate function
friend Enumerable iter::enumerate<Container>(Container&&, std::size_t);
template <typename T>
friend Enumerable<std::initializer_list<T>> iter::enumerate(
std::initializer_list<T>, std::size_t);

// for IterYield
using BasePair = std::pair<std::size_t, iterator_deref<Container>>;
Expand Down Expand Up @@ -111,10 +104,4 @@ iter::impl::Enumerable<Container> iter::enumerate(
return {std::forward<Container>(container), start};
}

template <typename T>
iter::impl::Enumerable<std::initializer_list<T>> iter::enumerate(
std::initializer_list<T> il, std::size_t start) {
return {std::move(il), start};
}

#endif

0 comments on commit 8d29587

Please sign in to comment.