Skip to content

refactor(resolver): replace resolver_results wrapper with a type alias#278

Open
mvandeberg wants to merge 1 commit into
cppalliance:developfrom
mvandeberg:pr/123-resolver-results
Open

refactor(resolver): replace resolver_results wrapper with a type alias#278
mvandeberg wants to merge 1 commit into
cppalliance:developfrom
mvandeberg:pr/123-resolver-results

Conversation

@mvandeberg

Copy link
Copy Markdown
Contributor

resolver_results was a shared_ptr<vector<resolver_entry>> wrapper that gave O(1) copies and an identity-based operator==. The equality ops were never used, and the only by-value sink (connect) must own the range for coroutine safety regardless, so an rvalue is moved in cheaply either way.

Make resolver_results an alias for std::vector<resolver_entry>: deletes the wrapper boilerplate and exposes the full vector interface. The one regression — deep-copying an lvalue you want to retain — is documented on resolve() and connect(), which point callers at std::move or the iterator-based connect overloads. Closes #123.

resolver_results was a shared_ptr<vector<resolver_entry>> wrapper that
gave O(1) copies and an identity-based operator==. The equality ops were
never used, and the only by-value sink (connect) must own the range for
coroutine safety regardless, so an rvalue is moved in cheaply either way.

Make resolver_results an alias for std::vector<resolver_entry>: deletes
the wrapper boilerplate and exposes the full vector interface. The one
regression — deep-copying an lvalue you want to retain — is documented on
resolve() and connect(), which point callers at std::move or the
iterator-based connect overloads. Closes cppalliance#123.
@cppalliance-bot

Copy link
Copy Markdown

An automated preview of the documentation is available at https://278.corosio.prtest3.cppalliance.org/index.html

If more commits are pushed to the pull request, the docs will rebuild at the same URL.

2026-06-12 20:28:52 UTC

@cppalliance-bot

Copy link
Copy Markdown

GCOVR code coverage report https://278.corosio.prtest3.cppalliance.org/gcovr/index.html
LCOV code coverage report https://278.corosio.prtest3.cppalliance.org/genhtml/index.html
Coverage Diff Report https://278.corosio.prtest3.cppalliance.org/diff-report/index.html

Build time: 2026-06-12 20:41:06 UTC

@codecov

codecov Bot commented Jun 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.65%. Comparing base (069ba7e) to head (f4ebe8d).
⚠️ Report is 10 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #278      +/-   ##
===========================================
- Coverage    77.73%   77.65%   -0.08%     
===========================================
  Files           96       96              
  Lines         7234     7204      -30     
  Branches      1764     1758       -6     
===========================================
- Hits          5623     5594      -29     
  Misses        1102     1102              
+ Partials       509      508       -1     
Files with missing lines Coverage Δ
...orosio/native/detail/iocp/win_resolver_service.hpp 69.56% <ø> (+0.30%) ⬆️
...sio/native/detail/posix/posix_resolver_service.hpp 81.40% <ø> (-0.07%) ⬇️
include/boost/corosio/native/native_resolver.hpp 92.85% <ø> (ø)
include/boost/corosio/resolver.hpp 95.06% <ø> (ø)
include/boost/corosio/resolver_results.hpp 100.00% <ø> (ø)

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 069ba7e...f4ebe8d. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Suggestion: replace resolver_results by vector<resolver_entry>

2 participants