-
Notifications
You must be signed in to change notification settings - Fork 3k
SocketAddress rework #12468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SocketAddress rework #12468
Conversation
This relates to #12455 - that compiler fault was probably triggered by the complexity of |
@kjbracey-arm, thank you for your changes. |
* Add optimised constexpr default constructor. Default construction was previously by a heavyweight defaulted `nsapi_addr_t` parameter. * Remove deprecated resolving constructor. * Take `nsapi_addr_t` inputs by constant reference rather than value. * Inline the trivial getters and setters. * Use `unique_ptr` to manage the text buffer. * Make `operator bool` explicit. * Optimise some methods. * Update to C++11 style (default initialisers, nullptr etc)
Unittest failed (will be reported soon) Lot of fine fixes here but squashing them into one, makes it hard to fix issues in the future if anything found in this commit.. I would split this one into at least 3 as stated in the Impact of changes (3 points) - they do not look related besides "rework" |
@ARMmbed/mbed-os-ipcore as @kjbracey-arm is OoO, is there anyone else who could push this forward ? |
I'll check the UT. |
Test run: FAILEDSummary: 1 of 3 test jobs failed Failed test jobs:
|
Closing to continue in the referenced ^^ PR |
Summary of changes
nsapi_addr_t
parameter.nsapi_addr_t
inputs by constant reference rather than value.unique_ptr
to manage the text buffer.operator bool
explicit.Impact of changes
bool
orint
or others no longer possible - any existing code which does not compile is most likely an error. (if (sockaddr)
is still fine - such "contextual conversions tobool
" can use the explicit operator).Migration actions required
SocketAddress
's constructor must be modified to useNetworkInterface::gethostbyname
orNetworkStack::gethostbyname
.Documentation
n/a
Pull request type
Test results
Reviewers