mirror of https://github.com/oxen-io/lokinet
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36792d4337
Lots and lots of places in the code had broken < operators because they are returning something like: foo < other.foo or bar < other.bar; but this breaks both the strict weak ordering requirements that are required for the "Compare" requirement for things like std::map/set/priority_queue. For example: a = {.foo=1, .bar=3} b = {.foo=3, .bar=1} does not have an ordering over a and b (both `a < b` and `b < a` are satisfied at the same time). This needs to be instead something like: foo < other.foo or (foo == other.foo and bar < other.bar) but that's a bit clunkier, and it is easier to use std::tie for tuple's built-in < comparison which does the right thing: std::tie(foo, bar) < std::tie(other.foo, other.bar) (Initially I noticed this in SockAddr/sockaddr_in6, but upon further investigation this extends to the major of multi-field `operator<`'s.) This fixes it by using std::tie (or something similar) everywhere we are doing multi-field inequalities. |
2 years ago | |
---|---|---|
.. | ||
address.cpp | 3 years ago | |
address.hpp | 2 years ago | |
async_key_exchange.cpp | 2 years ago | |
async_key_exchange.hpp | 4 years ago | |
auth.cpp | 2 years ago | |
auth.hpp | 2 years ago | |
context.cpp | 2 years ago | |
context.hpp | 3 years ago | |
convotag.cpp | 3 years ago | |
convotag.hpp | 3 years ago | |
endpoint.cpp | 2 years ago | |
endpoint.hpp | 2 years ago | |
endpoint_state.cpp | 2 years ago | |
endpoint_state.hpp | 2 years ago | |
endpoint_types.hpp | 3 years ago | |
endpoint_util.cpp | 2 years ago | |
endpoint_util.hpp | 3 years ago | |
handler.hpp | 3 years ago | |
hidden_service_address_lookup.cpp | 3 years ago | |
hidden_service_address_lookup.hpp | 3 years ago | |
identity.cpp | 2 years ago | |
identity.hpp | 2 years ago | |
info.cpp | 2 years ago | |
info.hpp | 2 years ago | |
intro.cpp | 2 years ago | |
intro.hpp | 2 years ago | |
intro_set.cpp | 2 years ago | |
intro_set.hpp | 2 years ago | |
lns_tracker.cpp | 4 years ago | |
lns_tracker.hpp | 3 years ago | |
lookup.cpp | 3 years ago | |
lookup.hpp | 3 years ago | |
name.cpp | 3 years ago | |
name.hpp | 4 years ago | |
outbound_context.cpp | 2 years ago | |
outbound_context.hpp | 3 years ago | |
pendingbuffer.hpp | 2 years ago | |
protocol.cpp | 2 years ago | |
protocol.hpp | 2 years ago | |
protocol_type.hpp | 2 years ago | |
router_lookup_job.cpp | 4 years ago | |
router_lookup_job.hpp | 4 years ago | |
sendcontext.cpp | 2 years ago | |
sendcontext.hpp | 3 years ago | |
session.cpp | 3 years ago | |
session.hpp | 3 years ago | |
tag.cpp | 4 years ago | |
tag.hpp | 4 years ago | |
vanity.hpp | 4 years ago |