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

bemanproject / expected / 44952328621
98%

Build:
DEFAULT BRANCH: main
Ran 21 Nov 2026 09:37PM UTC
Jobs 1
Files 3
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

21 Nov 2026 09:35PM UTC coverage: 97.529%. Remained the same
44952328621

push

github

web-flow
Make expected<T&, E>::value_type T, as optional<T&>'s is (#124)

`expected<T&, E>::value_type` was `T&`. It is now `T`, as
`optional<T&>::value_type` is.

Generic code names `value_type` when it holds on to a value: a local, a
member, a container element, a return type. With `T&`, each of those
becomes a reference with no storage or lifetime extension behind it, and
one bound to a temporary dangles without a diagnostic. Code that wants
the reference has `decltype(*e)`.

## What changes

- **`value_type`.** `T`, in the header, the generated wording,
`expected-new.tex`, and the D4280 synopsis.
- **`or_else` Mandates.** The old test compares `G::value_type` with
`T`, which no longer separates `expected<T, X>` from `expected<T&, X>`:
- on `expected<T&, E>` it would accept a callable returning `expected<T,
X>`, whose value path copies the referent;
- on `expected<T, E>` it would accept `expected<T&, X>` and then fail on
the deleted in-place constructor, not on the Mandates.

Both now require `G` to be `expected<T, X>` (or `expected<T&, X>`) for
some type `X`. No program that was valid before is rejected:
`expected<T&, X>` already failed the old test, since its `value_type`
was `T&`.
- **Wording.** `papers/wording/` is regenerated. `expected-new.tex`
marks the primary template's `or_else` Mandates as a change, and
`[expected.ref.monadic]` now states the reference `or_else` requirement
and that its value path returns `G(*val)`, which the primary's
`G(in_place, val)` cannot do.
- **D4280.** A new section on the choice and its consequence for
`or_else`, and a sentence in the summary of the `[expected]` edits.
- **Tests.**
- Alias checks for `expected<int&, std::string>`, `expected<const int&,
int>`, and `expected<int&, long&>`.
  - A reference `or_else` that changes the error type.
- Two new compile-failure tests: `or_else_returns_reference_fail` and
`expected_ref_or_else_returns_value_fail`.
- The four existing `or_else` compile-failure tests expect the new
m... (continued)

829 of 850 relevant lines covered (97.53%)

22.94 hits per line

Jobs
ID Job ID Ran Files Coverage
1 44952328621.1 21 Nov 2026 09:37PM UTC 3
97.53
GitHub Action Run
Source Files on build 44952328621
  • Tree
  • List 3
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #44952328621
  • 54bd02e8 on github
  • Prev Build on main (#44776241332)
  • Next Build on main (#46659183110)
  • 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