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

steve-downey / free_value_or / 34074932888
98%

Build:
DEFAULT BRANCH: main
Ran 07 Sep 2026 02:06AM UTC
Jobs 1
Files 7
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

07 Sep 2026 02:02AM UTC coverage: 96.803%. Remained the same
34074932888

push

github

steve-downey
Pin the observe-don't-consume behavior of rvalue nullables

The suite had no rvalue-nullable coverage worth the name: value_or,
reference_or, optional_ref and concept tests never passed one, and the two
calls in or_construct_laziness that did checked only the resulting value.
Flipping the library to move payloads out of rvalue nullables -- the second
of the paper's two open questions -- broke nothing. All 1424 tests passed
against semantics the paper describes as a deliberate design decision.

The discriminator is the copy count on the engaged path, because the return
types do not move: common_type decays, so common_type_t<int&, int&&> and
common_type_t<int&&, int&&> are both int and the value-producing signatures
are identical either way. Only reference_or changes type, from int& to
const int&, and it had no rvalue test at all.

Verified by mutation, not just by coverage. With the moving alternative
applied, the reference_or static_asserts fail to compile and, with those
removed so they cannot mask the rest, four test cases fail on the copy
counters: value_or over optional and over expected, or_invoke, and
or_construct. Coverage of value_or.hpp from this file alone is 100% of
lines, functions and branches; the branch figure needed the disengaged
cases for reference_or, or_invoke and both or_construct overloads, which
the first draft was missing.

The smart-pointer cases keep the same shape although they do not change
under the alternative, and the comment says why: optional and expected
ref-qualify operator*, so dereferencing an rvalue yields T&&, while
shared_ptr, unique_ptr and raw pointers return T& whatever their own value
category. Moving out of rvalue nullables would reach optional and expected
only and leave every pointer model copying. That asymmetry is an argument
about the open question the paper does not currently make.

1090 of 1126 relevant lines covered (96.8%)

17812.97 hits per line

Jobs
ID Job ID Ran Files Coverage
1 34074932888.1 07 Sep 2026 02:06AM UTC 7
96.8
GitHub Action Run
Source Files on build 34074932888
  • Tree
  • List 7
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #34074932888
  • c0af81a4 on github
  • Prev Build on main (#34070152215)
  • Next Build on main (#34075925961)
  • 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