mirror of https://github.com/CppCon/CppCon2014.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
342 B
C++
18 lines
342 B
C++
template<class It>
|
|
class iterable
|
|
{
|
|
It m_first, m_last;
|
|
public:
|
|
iterable() = default;
|
|
iterable(It first, It last) :
|
|
m_first(first), m_last(last) {}
|
|
It begin() const { return m_first; }
|
|
It end() const { return m_last; }
|
|
};
|
|
|
|
template<class It>
|
|
static inline iterable<It> make_iterable(It a, It b)
|
|
{
|
|
return iterable<It>(a, b);
|
|
}
|