• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

bemanproject / utf_view / 44012425758
100%

Build:
DEFAULT BRANCH: main
Ran 17 Nov 2026 03:49AM UTC
Jobs 1
Files 5
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

17 Nov 2026 03:45AM UTC coverage: 99.781% (+0.006%) from 99.775%
44012425758

push

github

ednolan
Converting mutable-iterator-to-const-iterator constructor

The precedent in the draft is that all iterators parameterized on
`Const` have a converting constructor from the mutable to the const
version of the iterator, so that a const iterator can be compared to
a mutable iterator or assigned a mutable iterator's value.

The edge case that to_utf_view has to handle that the other converting
constructors don't has to do with the fact that the data members of
to_utf_view's iterator carry different meanings depending on whether
the underlying iterator is an input iterator or a forward iterator;
for forward iterators, current_ is at the start of the current input
subsequence, but for input iterators, it's past-the-end.

And it's possible for a view to deliver iterators with different
iterator categories depending on whether or not the view is const.

This would create the risk of having a conversion whose member-wise
copies interacted poorly with a pathological view whose
const/non-const iterators did not agree on forward-ness.

As a result, we need to provide stricter constraints on the converting
constructor to rule out pathological views:

```
constexpr iterator(iterator<!Const> i)
  requires Const && convertible_to<iterator_t<V>, iterator_t<Base>> &&
           convertible_to<sentinel_t<V>, sentinel_t<Base>> &&
           (forward_range<V> == forward_range<Base>) &&
           (bidirectional_range<V> == bidirectional_range<Base>);
```

(We also need the bidirectional_range restriction because begin_ only
exists in bidirectional to_utf_view iterators, so the constraint
ensures that the iterators have the same members).

This commit implements tests that check conversion against
pathological test views it implements to ensure that conversions
with this edge case are rejected.

8 of 8 new or added lines in 1 file covered. (100.0%)

456 of 457 relevant lines covered (99.78%)

221.47 hits per line

Jobs
ID Job ID Ran Files Coverage
1 44012425758.1 17 Nov 2026 03:49AM UTC 5
99.78
GitHub Action Run
Source Files on build 44012425758
  • Tree
  • List 5
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #44012425758
  • 0daa956b on github
  • Prev Build on main (#43957684025)
  • Next Build on main (#44105742232)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc