Skip to content

feat(span): replace SFINAE with static_assert, add debug checks and tests#187

Merged
ComixHe merged 1 commit into
OpenAtom-Linyaps:masterfrom
ComixHe:master
Jun 26, 2026
Merged

feat(span): replace SFINAE with static_assert, add debug checks and tests#187
ComixHe merged 1 commit into
OpenAtom-Linyaps:masterfrom
ComixHe:master

Conversation

@ComixHe

@ComixHe ComixHe commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator
  • Split is_span_compatible_iter into is_contiguous_iterator + static_assert
  • Replace type SFINAE with static_assert in array/container/iterator ctors
  • span_to_address helper with static_assert guards non-iterator types
  • Add null+nonzero, first>last range checks with descriptive messages
  • Add crbegin/crend, container CTAD deduction guide
  • Use std::data/std::size instead of member calls
  • Fix template subviews cross-specialization private ctor bug
  • LWG 3358: (It,End) conditional noexcept
  • LWG 3103: avoid unsigned overflow in subspan runtime check
  • Add 18 tests (iterators, subviews, front/back, copy, observers, ctors)

…ests

- Split is_span_compatible_iter into is_contiguous_iterator + static_assert
- Replace type SFINAE with static_assert in array/container/iterator ctors
- span_to_address helper with static_assert guards non-iterator types
- Add null+nonzero, first>last range checks with descriptive messages
- Add crbegin/crend, container CTAD deduction guide
- Use std::data/std::size instead of member calls
- Fix template subviews cross-specialization private ctor bug
- LWG 3358: (It,End) conditional noexcept
- LWG 3103: avoid unsigned overflow in subspan runtime check
- Add 18 tests (iterators, subviews, front/back, copy, observers, ctors)

Signed-off-by: Yuming He <ComixHe1895@outlook.com>
@ComixHe ComixHe changed the title feat(span): replace SFINAE with static_assert, add debug checks and t… feat(span): replace SFINAE with static_assert, add debug checks and tests Jun 26, 2026
@ComixHe ComixHe merged commit 1908673 into OpenAtom-Linyaps:master Jun 26, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant