Add checks for extent compatability in span range constructor#181
Open
libbooze wants to merge 1 commit intoboostorg:developfrom
Open
Add checks for extent compatability in span range constructor#181libbooze wants to merge 1 commit intoboostorg:developfrom
libbooze wants to merge 1 commit intoboostorg:developfrom
Conversation
Member
|
I'm not OK with this change. I'll provide rationale when I have some time. |
Author
If you have some time please let me know if you do not like goals of the change, or if the issue is QoI. If the issue is just QoI I can rework the pull request. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based on discussion in #179 / @pdimov suggestion.
few notes
spanof extent 3 fromboost::arrayof size 4. As this is not allowed forstd::arrayI presumed same logic should follow for other ranges.span_default_constructed_sizeworks correctly maybe it should be moved to separate header if we think it will be useful in more placesBOOST_ASSERT, I prefer to do that in separate PRmax_size, that may be useful for some fixed buffer types, e.g. static_stringstd::spanavailability in test I used C++23 macro(I presume all C++23 compilers have all C++20 headers) since it is easier than to check for span header, if you prefer I can switch to specific span checkboost::arrayas a nice range type, I know core can not depend on almost anything, but I presumed it is fine in tests a I think boost array does not depend on core, if not let me know so I make a simple test type.b2 cxxstd=03 testfails, not sure if that is fine as C++11 is new minimal Boost version