MCPcopy Create free account
hub / github.com/3rdparty/libprocess / convert

Function convert

include/process/address.hpp:431–447  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

429#ifndef __WINDOWS__
430template <>
431inline Try<unix::Address> convert(Try<Address>&& address)
432{
433 if (address.isError()) {
434 return Error(address.error());
435 }
436
437 return address->visit(
438 [](const unix::Address& address) -> Try<unix::Address> {
439 return address;
440 },
441 [](const inet4::Address&) -> Try<unix::Address> {
442 return Error("Unexpected address family");
443 },
444 [](const inet6::Address&) -> Try<unix::Address> {
445 return Error("Unexpected address family");
446 });
447}
448#endif // __WINDOWS__
449
450

Callers

nothing calls this directly

Calls 1

visitMethod · 0.45

Tested by

no test coverage detected