-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[span] Make span standard_layout #877
[span] Make span standard_layout #877
Conversation
The design @ned14 proposed in #874 (comment) would be much better. |
@AdamBucior couldyou elaborate on that as this is essentially the same design. The one difference with inheritance would be that One would have to sprinkle |
You can use |
Again I am unsure what benefit inheritance has over composition? |
I feel like inheritance is more trustworthy and harder to get wrong. Inheritance is already widely used in the STL and span already uses it, so will be easier to merge. Also won't have to be blocked on |
bb77cec
to
51f0d5b
Compare
Ok so given that MSVC does not support |
@aymarino explained:
See here: https://developercommunity.visualstudio.com/solutions/973748/view.html So I'm afraid that if you can't do it without |
9feaf11
to
a5e7b32
Compare
Clarify test comment.
Note that the |
4743584
to
8b9843a
Compare
Ok. I am going out on a limb an declare that the |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
We'll re-run and see if it's spurious. If it is I'll open an issue to track it/investigate it later. |
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 think this is a good improvement (despite requesting more information in #874 about why pointer-length layout is so important). Noticed minor stylistic issues.
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.
Looks good, but I'd like to push a change to reverse the internal constructor parameters.
Thanks for simplifying |
Fixes microsoft#874. Co-authored-by: Casey Carter <[email protected]> Co-authored-by: Stephan T. Lavavej <[email protected]>
This moves
span
from inheritance to composition, which is problematic given that we define members both in the base class (_Mysize
) and the derived class (_Mydata
)However, this is blocked on
[[no_unique_address]]
working on MSVC