Refactor buffers_suffix:

* Tidy up tests
* Increase code coverage
* Remove unnecessary move special members
* Correct behavior for default constructed iterators
This commit is contained in:
Vinnie Falco committed 2018-12-19 20:59:20 -08:00
1 parent 9d27f2659f
commit 477e5a6f98
5 files changed
+87 -103

No files matched your search

@@ -49,9 +49,7 @@ public:
std::bidirectional_iterator_tag;
const_iterator() = default;
const_iterator(const_iterator&& other) = default;
const_iterator(const_iterator const& other) = default;
const_iterator& operator=(const_iterator&& other) = default;
const_iterator& operator=(const_iterator const& other) = default;
bool
@@ -69,9 +67,9 @@ public:
reference
operator*() const
{
return it_ == b_->begin_
? value_type{*it_} + b_->skip_
: *it_;
if(it_ == b_->begin_)
return value_type(*it_) + b_->skip_;
return value_type{*it_};
}
pointer