Skip to content

Instantly share code, notes, and snippets.

@JohanMabille
Created January 6, 2020 16:49
Show Gist options
  • Save JohanMabille/382811e7048750affcaf53caf7ba36ee to your computer and use it in GitHub Desktop.
Save JohanMabille/382811e7048750affcaf53caf7ba36ee to your computer and use it in GitHub Desktop.
template <class St, class S, layout_type L>
class xiterator
{
public:
using self_type = xiterator<St, S, L>;
using stepper_type = St;
using value_type = typename stepper_type::value_type;
using reference = typename stepper_type::reference;
using pointer = typename stepper_type::pointer;
using difference_type = typename stepper_type::difference_type;
using size_type = typename stepper_type::size_type;
using iterator_category = std::random_access_iterator_tag;
using shape_type = S;
using index_type = S;
self_type& operator++();
reference operator*() const;
pointer operator->() const;
private:
stepper_type m_st;
shape_type* p_shape;
index_type m_index;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment