Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update testing #93

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion clif/testing/iterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
// It's using exceptions to demonstrate they are handled correctly by CLIF.

#include <array>
#include <cstddef>
#include <iterator>

namespace clif_iterator_test {
Expand All @@ -30,8 +31,14 @@ template<typename T, size_t N>
class Ring {
public:
// Mimic std containers, so that Ring::const_iterator is a real thing.
class const_iterator: public std::iterator<std::forward_iterator_tag, T> {
class const_iterator {
public:
using value_type = T;
using difference_type = ptrdiff_t;
using pointer = T*;
using reference = T&;
using iterator_category = std::forward_iterator_tag;

// CLIF requires both or neither of copy/move constructors and copy/move
// copy assignment operators.
const_iterator(const const_iterator&) = default;
Expand Down