Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- template<typename IBegin, typename IEnd = IBegin>
- class Range {
- private:
- IBegin begin_iterator;
- IEnd end_iterator;
- public:
- constexpr Range(IBegin begin_, IEnd end_) noexcept : begin_iterator(std::move(begin_)), end_iterator(std::move(end_)) {}
- constexpr IBegin begin() const noexcept { return cbegin(); }
- constexpr IEnd end() const noexcept { return cend(); }
- constexpr IBegin cbegin() const noexcept { return begin_iterator; }
- constexpr IEnd cend() const noexcept { return end_iterator; }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement