Skip to content

Add SegmentedSequence range ingestion - #445

Draft
helly25 wants to merge 2 commits into
proof/segmented-sequence-layoutsfrom
feature/segmented-sequence-ranges
Draft

helly25 wants to merge 2 commits into
proof/segmented-sequence-layoutsfrom
feature/segmented-sequence-ranges

Conversation

@helly25

@helly25 helly25 commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

Add C++20 iterator/sentinel construction and range append support to the segmented sequence. Sized inputs reserve once before construction, while single-pass inputs retain their natural prefix-on-failure semantics.

AG;DR

  • adds a constrained input-iterator/sentinel constructor
  • adds append_range for C++20 input ranges
  • preflights sized inputs against max_size() and reserves their complete capacity
  • forwards the range into iteration so rvalue ranges retain their value category and clang-tidy accepts the forwarding-reference contract
  • releases acquired storage if construction throws during the constructor
  • tests construction and append across segment boundaries

Validation:

  • bazel test //mbo/container:segmented_sequence_test
  • focused pre-commit hooks passed except the explicitly skipped local clang-tidy hook and sandbox-incompatible trunk wrapper; clang-format passed

This is a chained draft based on PR #444 and must not merge before its predecessors.

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