Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class foo
- {
- public:
- foo() noexcept : m_index(0)
- {
- }
- void operator ++ () noexcept
- {
- if (m_index < 8)
- ++m_index;
- else
- m_index = 0;
- }
- char value() const noexcept
- {
- return m_value_jump[m_index];
- }
- private:
- char m_index;
- static constexpr std::array<const char, 8> m_value_jump = { 3,8,4,3,7,0,1,1 }; //random values
- };
Advertisement
Add Comment
Please, Sign In to add comment