Skip to content

Endpoint order#266

Merged
sgerbino merged 2 commits into
cppalliance:developfrom
sgerbino:feature/endpoint-order
Jun 2, 2026
Merged

Endpoint order#266
sgerbino merged 2 commits into
cppalliance:developfrom
sgerbino:feature/endpoint-order

Conversation

@sgerbino
Copy link
Copy Markdown
Collaborator

@sgerbino sgerbino commented Jun 2, 2026

Resolves #258.

sgerbino added 2 commits June 2, 2026 19:58
Add a strict total ordering to endpoint so it can be used as a key in
std::map and std::set without a custom comparator. Endpoints order by
address family (IPv4 before IPv6), then address value, then port,
consistent with operator==.

Drop the now-redundant explicit operator!=; C++20 synthesizes it from
operator==, matching local_endpoint's comparison surface.

Closes cppalliance#258
Add unit tests for local_endpoint's operator== and operator<=>, which
were previously untested public API. Covers empty-first ordering,
prefix-before-extension, abstract-socket sorting (leading null byte),
the path-too-long boundary, and use as a std::map key.
@cppalliance-bot
Copy link
Copy Markdown

An automated preview of the documentation is available at https://266.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-02 18:18:37 UTC

@cppalliance-bot
Copy link
Copy Markdown

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

Build time: 2026-06-02 18:25:25 UTC

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.78%. Comparing base (1e591ce) to head (4283cb7).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #266   +/-   ##
========================================
  Coverage    77.78%   77.78%           
========================================
  Files           96       96           
  Lines         7256     7256           
  Branches      1769     1769           
========================================
  Hits          5644     5644           
  Misses        1102     1102           
  Partials       510      510           
Files with missing lines Coverage Δ
include/boost/corosio/endpoint.hpp 95.16% <ø> (ø)

Continue to review full report in Codecov by Sentry.

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

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

@sgerbino sgerbino merged commit dcda198 into cppalliance:develop Jun 2, 2026
41 checks passed
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.

Add relational operators to corosio::endpoint for use as ordered map key

2 participants