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

bemanproject / expected / 29213795061
97%

Build:
DEFAULT BRANCH: main
Ran 12 Jul 2026 11:43PM 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

12 Jul 2026 11:39PM UTC coverage: 97.03% (+0.02%) from 97.013%
29213795061

push

github

web-flow
Key expected's SMF constraints/noexcept on E, not the exposition-only unexpected<E> (#69)

## Summary

`expected<T,E>` stores its error as the exposition-only `unexpected<E>`
(D4280) so the reference specializations can share one member type
(`unexpected<E&>` holds a pointer). This PR makes sure that's genuinely
observable-only, ABI-preserving scaffolding:

- Re-keys every special-member
*Constraints*/*Mandates*/`noexcept`/triviality condition in
`expected.hpp` (all three specializations) from `unexpected<E>` to `E`,
and does the same in the just-landed wording (`expected-new.tex`). An
implementation that stores `E` directly stays trivially conforming — no
ABI, layout, or mangling change is forced on anyone.
- Fixes two divergences from `std::expected` a beman-vs-`std`
trait-equivalence harness (added here) turned up:
- the hidden-friend `swap` was unconstrained, so
`is_swappable_v<expected<T,E>>` was a hard compile error (not a
well-formed `false`) for a move-restricted `E`
- the non-trivial copy constructor/assignment were missing their
conditional `noexcept`
- Declares the trivial-path copy/move constructor unconditionally (no
`requires`-clause), matching libstdc++'s own `<expected>` idiom, after
the equivalence harness caught GCC and Clang disagreeing on
`is_trivially_copyable_v<expected<int, Immovable>>` for a
fully-immovable error type. The same trick was tried for assignment and
reverted — it silently broke the "move assignment must be deleted when
neither side is nothrow-movable" safety guarantee — so assignment
operators keep their original two-candidate form; this is documented in
the paper rather than forced.
- Documents both decisions in `D4280R0.tex` (D12: exposition-only
member, ABI stability as a design goal, resolution toward the T/E
rendering if any divergence is ever found; D13: `expected<T,E>` is
trivially copyable when `T`,`E` are, called out as a drive-by fix over
`std::expected`'s non-trivial-by-specification-accident assignment)... (continued)

12 of 0 new or added lines in 0 files covered. (NaN%)

14 existing lines in 1 file now uncovered.

686 of 707 relevant lines covered (97.03%)

25.86 hits per line

Coverage Regressions

Lines Coverage ∆ File
14
97.13
0.02% include/beman/expected/expected.hpp
Jobs
ID Job ID Ran Files Coverage
1 29213795061.1 12 Jul 2026 11:43PM UTC 3
97.03
GitHub Action Run
Source Files on build 29213795061
  • 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 #29213795061
  • 5ac68a03 on github
  • Prev Build on main (#29211247712)
  • Next Build on main (#29223062618)
  • 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