-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Add std::span implementation for cxxsupport #13881
Conversation
@marcemmers, thank you for your changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks pretty good to me. A few comments for starters.
platform/cxxsupport/mstd_span
Outdated
typename mstd::enable_if_t<detail::is_container<R>::value && | ||
detail::is_compatible<R&, ElementType>::value, int> = 0> | ||
constexpr span(R&& r) : | ||
_storage( mstd::data( r ), mstd::size( r )) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No spaces inside parentheses.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still assorted spaces here, and line 206.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @marcemmers for this submission; it looks quite good, I really like the use of the storage class.
I have few questions:
- Should we mark
mbed::Span
as deprecated ? I'm not seeing much value in promoting both. - What is the transition path from
mbed::Span
tomstd::span
? - @kjbracey-arm What are the expectations in term of documentation for
mstd
?
I'll review the details of the code tomorrow.
Yes, that should follow on.
Don't quite understand the question. Before or when we deprecate it, we'd need to convert the Mbed code base.
cxxsupport could do with a proper docs site section - at the minute all it has is its own README.md and comments in the files themselves. However, for the individual components like this, I believe you don't really need to say much or anything usually. Everything in Extensions like |
I was thinking of users of Mbed OS that use |
As this is new feature, if we want to have this in the next release (it will be feature release), please let us know (code freeze end of today). |
So what's the plan here guys? Should I add the doxygen for the make_Span functions. Is there anything else I can do? |
@marcemmers doxygen docs always good to have. @pan- @kjbracey-arm What would you suggest, what else is to be done here ? |
@0xc0170 It seems fairly complete to me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty happy with this - just want to lose the nonconformant as_bytes
.
@marcemmers can you take a look at the review comments please. |
Thanks for the reminder, I'll take a look this weekend. |
68bd6a9
to
78f2cfc
Compare
Pull request has been modified.
Thank you @marcemmers , I started CI |
Jenkins CI Test : ❌ FAILEDBuild Number: 1 | 🔒 Jenkins CI Job | 🌐 Logs & ArtifactsCLICK for Detailed Summary
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nearly there - shouldn't take much longer if we can just get the iteration cycle down :)
Main problem is the missing definitions - see comment thread elsewhere.
platform/cxxsupport/mstd_span
Outdated
typename mstd::enable_if_t<detail::is_container<R>::value && | ||
detail::is_compatible<R&, ElementType>::value, int> = 0> | ||
constexpr span(R&& r) : | ||
_storage( mstd::data( r ), mstd::size( r )) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still assorted spaces here, and line 206.
Keep make_span functions even when <span> is available for compatibility
Pull request has been modified.
CI started |
Jenkins CI Test : ✔️ SUCCESSBuild Number: 2 | 🔒 Jenkins CI Job | 🌐 Logs & ArtifactsCLICK for Detailed Summary
|
Summary of changes
Adds std::span implementation to cxxsupport folder in namespace mstd.
See discussion in #13868.
Impact of changes
Migration actions required
Documentation
None
Pull request type
Test results
Reviewers
@kjbracey-arm